Browse Source

Fixed ViewTest to use OS-dependent newline under Windows

tags/3.0.0-alpha1
Alexander Makarov 7 years ago
parent
commit
e52e1124c1
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 2
      tests/framework/web/ViewTest.php

2
tests/framework/web/ViewTest.php

@ -39,7 +39,7 @@ class ViewTest extends TestCase
$view = new View();
$view->registerJsFile('@web/js/somefile.js', ['position' => View::POS_BEGIN]);
$html = $view->render('@yiiunit/data/views/layout.php', ['content' => 'content']);
$this->assertContains('<body>' . "\n" . '<script src="/baseUrl/js/somefile.js"></script>', $html);
$this->assertContains('<body>' . PHP_EOL . '<script src="/baseUrl/js/somefile.js"></script>', $html);
$view = new View();
$view->registerJsFile('@web/js/somefile.js', ['position' => View::POS_END]);

Loading…
Cancel
Save