minor #14926 [2.3] Fix tests on Windows (WouterJ)

This PR was squashed before being merged into the 2.3 branch (closes #14926).

Discussion
----------

[2.3] Fix tests on Windows

There were quite a few tests failing when running on my Windows PC. These fixes are the ones I could easily fix.

| Q | A
| --- | ---
| License | MIT
| Fixed tickets | -

Commits
-------

e3e5f3d [2.3] Fix tests on Windows
This commit is contained in:
Fabien Potencier 2015-06-10 02:09:28 +02:00
commit c95d86c9c6
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -22,7 +22,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
public function testDebugAllRoutes()
{
$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->assertContains('[router] Current routes', $tester->getDisplay());
@ -31,7 +31,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
public function testDebugSingleRoute()
{
$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->assertContains('[router] Route "foo"', $tester->getDisplay());

View File

@ -24,7 +24,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
public function testWithMatchPath()
{
$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->assertContains('[router] Route "foo"', $tester->getDisplay());
@ -33,7 +33,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
public function testWithNotMatchPath()
{
$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->assertContains('None of the routes match the path "/test"', $tester->getDisplay());