diff options
Diffstat (limited to 'tests/Core/Templates/TemplatesTest.php')
-rw-r--r-- | tests/Core/Templates/TemplatesTest.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Core/Templates/TemplatesTest.php b/tests/Core/Templates/TemplatesTest.php new file mode 100644 index 00000000000..03565411a13 --- /dev/null +++ b/tests/Core/Templates/TemplatesTest.php @@ -0,0 +1,20 @@ +<?php + +namespace Tests\Core\Templates; + +class TemplatesTest extends \Test\TestCase { + + public function test403() { + $template = \OC::$SERVERROOT . '/core/templates/403.php'; + $expectedHtml = "<ul><li class='error'>\n\t\tAccess forbidden<br><p class='hint'></p></li></ul>"; + $this->assertTemplate($expectedHtml, $template); + } + + public function test404() { + $template = \OC::$SERVERROOT . '/core/templates/404.php'; + $href = \OC::$server->getURLGenerator()->linkTo('', 'index.php'); + $expectedHtml = "<ul><li class='error'>\n\t\t\tFile not found<br><p class='hint'>The specified document has not been found on the server.</p>\n<p class='hint'><a href='$href'>You can click here to return to ownCloud.</a></p>\n\t\t</li></ul>"; + $this->assertTemplate($expectedHtml, $template); + } + +} |