diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php index 6974cd1ffd..b511f90d17 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php @@ -154,7 +154,7 @@ class ControllerResolverTest extends BaseControllerResolverTest { return array( array('foo', '\LogicException', '/Unable to parse the controller name "foo"\./'), - array('foo::bar', '\InvalidArgumentException', '/Class "foo" does not exist\./'), + array('oof::bar', '\InvalidArgumentException', '/Class "oof" does not exist\./'), array('stdClass', '\LogicException', '/Unable to parse the controller name "stdClass"\./'), array( 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar', diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 24dbcfc40b..e66594021c 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -346,7 +346,7 @@ class Table */ private function renderColumnSeparator() { - $this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()); } /** @@ -363,12 +363,12 @@ class Table return; } - $this->renderColumnSeparator(); + $rowContent = $this->renderColumnSeparator(); foreach ($this->getRowColumns($row) as $column) { - $this->renderCell($row, $column, $cellFormat); - $this->renderColumnSeparator(); + $rowContent .= $this->renderCell($row, $column, $cellFormat); + $rowContent .= $this->renderColumnSeparator(); } - $this->output->writeln(''); + $this->output->writeln($rowContent); } /** @@ -397,12 +397,13 @@ class Table $style = $this->getColumnStyle($column); if ($cell instanceof TableSeparator) { - $this->output->write(sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width))); - } else { - $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - $content = sprintf($style->getCellRowContentFormat(), $cell); - $this->output->write(sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType()))); + return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width)); } + + $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + $content = sprintf($style->getCellRowContentFormat(), $cell); + + return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType())); } /** diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index cd040a5902..163ef530e3 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -463,7 +463,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase $handler->handleException($exception); $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]); - $this->assertSame("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement?", $args[0]->getMessage()); + $this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); } public function testHandleFatalErrorOnHHVM() diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php index 1e5fde618a..7daf0daa29 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -128,7 +128,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase return array( array(1, 'InvalidArgumentException', 'Unable to find controller "1".'), array('foo', 'InvalidArgumentException', 'Unable to find controller "foo".'), - array('foo::bar', 'InvalidArgumentException', 'Class "foo" does not exist.'), + array('oof::bar', 'InvalidArgumentException', 'Class "oof" does not exist.'), array('stdClass', 'InvalidArgumentException', 'Unable to find controller "stdClass".'), array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::staticsAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "staticsAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest", did you mean "staticAction"?'), array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::privateAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "privateAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'),