You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TemplatesTest.php 790B

1234567891011121314151617181920
  1. <?php
  2. namespace Tests\Core\Templates;
  3. class TemplatesTest extends \Test\TestCase {
  4. public function test403() {
  5. $template = \OC::$SERVERROOT . '/core/templates/403.php';
  6. $expectedHtml = "<ul><li class='error'>\n\t\tAccess forbidden<br><p class='hint'></p></li></ul>";
  7. $this->assertTemplate($expectedHtml, $template);
  8. }
  9. public function test404() {
  10. $template = \OC::$SERVERROOT . '/core/templates/404.php';
  11. $href = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
  12. $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 Nextcloud.</a></p>\n\t\t</li></ul>";
  13. $this->assertTemplate($expectedHtml, $template);
  14. }
  15. }