Commit 0157964f by Qiang Xue

Fixed test breaks.

parent c2343597
......@@ -56,7 +56,7 @@ class ViewRendererTest extends TestCase
$view = $this->mockView();
$content = $view->renderFile('@yiiunit/extensions/smarty/views/layout.tpl');
$this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
$this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/dist/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
}
......
......@@ -39,7 +39,7 @@ class ViewRendererTest extends DatabaseTestCase
$view = $this->mockView();
$content = $view->renderFile('@yiiunit/extensions/twig/views/layout.twig');
$this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
$this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/dist/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
}
public function testAppGlobal()
......
......@@ -36,7 +36,7 @@ class CompareValidatorTest extends TestCase
$val = new CompareValidator(['compareValue' => $value]);
$val->operator = $op;
foreach ($tests as $test) {
$this->assertEquals($test[1], $val->validate($test[0]));
$this->assertEquals($test[1], $val->validate($test[0]), "Testing $op");
}
}
}
......@@ -46,8 +46,8 @@ class CompareValidatorTest extends TestCase
return [
'===' => [
[$value, true],
[(string) $value, false],
[(float) $value, false],
[(string) $value, true],
[(float) $value, true],
[$value + 1, false],
],
'!=' => [
......@@ -59,8 +59,8 @@ class CompareValidatorTest extends TestCase
],
'!==' => [
[$value, false],
[(string) $value, true],
[(float) $value, true],
[(string) $value, false],
[(float) $value, false],
[false, true],
],
'>' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment