[2.3] Fix tests on Windows

This commit is contained in:
WouterJ 2015-06-09 23:44:30 +02:00 committed by Fabien Potencier
parent a48d36ae31
commit e3e5f3d661
3 changed files with 6 additions and 6 deletions

View File

@ -73,8 +73,8 @@ class TwigExtractorTest extends TestCase
} }
/** /**
* @expectedException \Twig_Error * @expectedException \Twig_Error
* @expectedExceptionMessage Unclosed "block" in "extractor/syntax_error.twig" at line 1 * @expectedExceptionMessageRegExp /Unclosed "block" in "extractor(\/|\\)syntax_error\.twig" at line 1/
*/ */
public function testExtractSyntaxError() public function testExtractSyntaxError()
{ {

View File

@ -22,7 +22,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
public function testDebugAllRoutes() public function testDebugAllRoutes()
{ {
$tester = $this->createCommandTester(); $tester = $this->createCommandTester();
$ret = $tester->execute(array('name' => null)); $ret = $tester->execute(array('name' => null), array('decorated' => false));
$this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertEquals(0, $ret, 'Returns 0 in case of success');
$this->assertContains('[router] Current routes', $tester->getDisplay()); $this->assertContains('[router] Current routes', $tester->getDisplay());
@ -31,7 +31,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
public function testDebugSingleRoute() public function testDebugSingleRoute()
{ {
$tester = $this->createCommandTester(); $tester = $this->createCommandTester();
$ret = $tester->execute(array('name' => 'foo')); $ret = $tester->execute(array('name' => 'foo'), array('decorated' => false));
$this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertEquals(0, $ret, 'Returns 0 in case of success');
$this->assertContains('[router] Route "foo"', $tester->getDisplay()); $this->assertContains('[router] Route "foo"', $tester->getDisplay());

View File

@ -24,7 +24,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
public function testWithMatchPath() public function testWithMatchPath()
{ {
$tester = $this->createCommandTester(); $tester = $this->createCommandTester();
$ret = $tester->execute(array('path_info' => '/foo', 'foo')); $ret = $tester->execute(array('path_info' => '/foo', 'foo'), array('decorated' => false));
$this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertEquals(0, $ret, 'Returns 0 in case of success');
$this->assertContains('[router] Route "foo"', $tester->getDisplay()); $this->assertContains('[router] Route "foo"', $tester->getDisplay());
@ -33,7 +33,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
public function testWithNotMatchPath() public function testWithNotMatchPath()
{ {
$tester = $this->createCommandTester(); $tester = $this->createCommandTester();
$ret = $tester->execute(array('path_info' => '/test', 'foo')); $ret = $tester->execute(array('path_info' => '/test', 'foo'), array('decorated' => false));
$this->assertEquals(1, $ret, 'Returns 1 in case of failure'); $this->assertEquals(1, $ret, 'Returns 1 in case of failure');
$this->assertContains('None of the routes match the path "/test"', $tester->getDisplay()); $this->assertContains('None of the routes match the path "/test"', $tester->getDisplay());