Merge branch '2.8' into 3.0
* 2.8: [BrowserKit] Bump dom-crawler minimum version requirement Make one call to "OutputInterface::write" method per table row [HttpKernel] Fix context dependent test [Debug] Fix context dependent test
This commit is contained in:
commit
75a3a79d30
@ -154,7 +154,7 @@ class ControllerResolverTest extends BaseControllerResolverTest
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('foo', '\LogicException', '/Unable to parse the controller name "foo"\./'),
|
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('stdClass', '\LogicException', '/Unable to parse the controller name "stdClass"\./'),
|
||||||
array(
|
array(
|
||||||
'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar',
|
'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar',
|
||||||
|
@ -307,7 +307,7 @@ class Table
|
|||||||
*/
|
*/
|
||||||
private function renderColumnSeparator()
|
private function renderColumnSeparator()
|
||||||
{
|
{
|
||||||
$this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
|
return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -324,12 +324,12 @@ class Table
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->renderColumnSeparator();
|
$rowContent = $this->renderColumnSeparator();
|
||||||
foreach ($this->getRowColumns($row) as $column) {
|
foreach ($this->getRowColumns($row) as $column) {
|
||||||
$this->renderCell($row, $column, $cellFormat);
|
$rowContent .= $this->renderCell($row, $column, $cellFormat);
|
||||||
$this->renderColumnSeparator();
|
$rowContent .= $this->renderColumnSeparator();
|
||||||
}
|
}
|
||||||
$this->output->writeln('');
|
$this->output->writeln($rowContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -358,12 +358,13 @@ class Table
|
|||||||
$style = $this->getColumnStyle($column);
|
$style = $this->getColumnStyle($column);
|
||||||
|
|
||||||
if ($cell instanceof TableSeparator) {
|
if ($cell instanceof TableSeparator) {
|
||||||
$this->output->write(sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width)));
|
return 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())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -463,7 +463,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$handler->handleException($exception);
|
$handler->handleException($exception);
|
||||||
|
|
||||||
$this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]);
|
$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()
|
public function testHandleFatalErrorOnHHVM()
|
||||||
|
@ -128,7 +128,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
|
|||||||
return array(
|
return array(
|
||||||
array(1, 'InvalidArgumentException', 'Unable to find controller "1".'),
|
array(1, 'InvalidArgumentException', 'Unable to find controller "1".'),
|
||||||
array('foo', 'InvalidArgumentException', 'Unable to find controller "foo".'),
|
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('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::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'),
|
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'),
|
||||||
|
Reference in New Issue
Block a user