Merge branch '3.0' into 3.1
* 3.0: [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
1e673019cf
@ -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',
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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()
|
||||
|
@ -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'),
|
||||
|
Reference in New Issue
Block a user