Skip to content

Commit d29218f

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [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
2 parents c4716d2 + 22ab211 commit d29218f

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function getUndefinedControllers()
150150
{
151151
return array(
152152
array('foo', '\LogicException', 'Unable to parse the controller name "foo".'),
153-
array('foo::bar', '\InvalidArgumentException', 'Class "foo" does not exist.'),
153+
array('oof::bar', '\InvalidArgumentException', 'Class "oof" does not exist.'),
154154
array('stdClass', '\LogicException', 'Unable to parse the controller name "stdClass".'),
155155
array(
156156
'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar',

src/Symfony/Component/BrowserKit/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.9",
20-
"symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0"
20+
"symfony/dom-crawler": "~2.1|~3.0.0"
2121
},
2222
"require-dev": {
2323
"symfony/process": "~2.3.34|~2.7,>=2.7.6|~3.0.0",

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ private function renderRowSeparator()
307307
*/
308308
private function renderColumnSeparator()
309309
{
310-
$this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
310+
return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar());
311311
}
312312

313313
/**
@@ -324,12 +324,12 @@ private function renderRow(array $row, $cellFormat)
324324
return;
325325
}
326326

327-
$this->renderColumnSeparator();
327+
$rowContent = $this->renderColumnSeparator();
328328
foreach ($this->getRowColumns($row) as $column) {
329-
$this->renderCell($row, $column, $cellFormat);
330-
$this->renderColumnSeparator();
329+
$rowContent .= $this->renderCell($row, $column, $cellFormat);
330+
$rowContent .= $this->renderColumnSeparator();
331331
}
332-
$this->output->writeln('');
332+
$this->output->writeln($rowContent);
333333
}
334334

335335
/**
@@ -358,12 +358,13 @@ private function renderCell(array $row, $column, $cellFormat)
358358
$style = $this->getColumnStyle($column);
359359

360360
if ($cell instanceof TableSeparator) {
361-
$this->output->write(sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width)));
362-
} else {
363-
$width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
364-
$content = sprintf($style->getCellRowContentFormat(), $cell);
365-
$this->output->write(sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType())));
361+
return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width));
366362
}
363+
364+
$width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
365+
$content = sprintf($style->getCellRowContentFormat(), $cell);
366+
367+
return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType()));
367368
}
368369

369370
/**

src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ public function testHandleErrorException()
499499
$handler->handleException($exception);
500500

501501
$this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]);
502-
$this->assertSame("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement?", $args[0]->getMessage());
502+
$this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage());
503503
}
504504

505505
public function testHandleFatalErrorOnHHVM()

src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function getUndefinedControllers()
127127
{
128128
return array(
129129
array('foo'),
130-
array('foo::bar'),
130+
array('oof::bar'),
131131
array('stdClass'),
132132
array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar'),
133133
);

0 commit comments

Comments
 (0)