Skip to content

Commit 8cd835e

Browse files
committed
Merge branch '2.8' into 3.2
* 2.8: Fixes a typo in the form collector styles [HttpKernel] Fixed bug with purging of HTTPS URLs fix some risky tests [DI] [YamlFileLoader] change error message of a non existing file [Security] Added option to return true in the method isRememberMeRequested
2 parents 74a1cc3 + 295a8e0 commit 8cd835e

File tree

35 files changed

+209
-116
lines changed

35 files changed

+209
-116
lines changed

src/Symfony/Bridge/Doctrine/Tests/HttpFoundation/DbalSessionHandlerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@ public function testConstruct()
2525
{
2626
$connection = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
2727
$handler = new DbalSessionHandler($connection);
28+
29+
$this->assertInstanceOf('Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler', $handler);
2830
}
2931
}

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ public function testThemeBlockInheritanceUsingDynamicExtend()
8989
;
9090

9191
$this->renderer->setTheme($view, array('page_dynamic_extends.html.twig'));
92-
$this->renderer->searchAndRenderBlock($view, 'row');
92+
$this->assertMatchesXpath(
93+
$this->renderer->searchAndRenderBlock($view, 'row'),
94+
'/div/label[text()="child"]'
95+
);
9396
}
9497

9598
public function isSelectedChoiceProvider()

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/StopwatchHelperTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ public function testDevEnvironment()
3030
public function testProdEnvironment()
3131
{
3232
$helper = new StopwatchHelper(null);
33+
$helper->start('foo');
3334

34-
try {
35-
$helper->start('foo');
36-
} catch (\BadMethodCallException $e) {
37-
$this->fail('Assumed stopwatch is not called when not provided');
38-
}
35+
// add a dummy assertion here to satisfy PHPUnit, the only thing we want to test is that the code above
36+
// can be executed without throwing any exceptions
37+
$this->addToAssertionCount(1);
3938
}
4039
}

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,9 @@ class TemplateTest extends TestCase
1919
/**
2020
* @dataProvider getTemplateToPathProvider
2121
*/
22-
public function testGetPathForTemplatesInABundle($template, $path)
22+
public function testGetPathForTemplate($template, $path)
2323
{
24-
if ($template->get('bundle')) {
25-
$this->assertEquals($template->getPath(), $path);
26-
}
27-
}
28-
29-
/**
30-
* @dataProvider getTemplateToPathProvider
31-
*/
32-
public function testGetPathForTemplatesOutOfABundle($template, $path)
33-
{
34-
if (!$template->get('bundle')) {
35-
$this->assertEquals($template->getPath(), $path);
36-
}
24+
$this->assertSame($template->getPath(), $path);
3725
}
3826

3927
public function getTemplateToPathProvider()

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
}
6161
#tree-menu .empty {
6262
border: 0;
63-
mmargin: 0;
63+
margin: 0;
6464
padding: 0;
6565
}
6666
#tree-details-container {

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,12 @@ public function testVerboseValueNotBreakArguments()
699699
$input = new ArgvInput(array('cli.php', '-v', 'foo:bar'));
700700
$application->run($input, $output);
701701

702+
$this->addToAssertionCount(1);
703+
702704
$input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar'));
703705
$application->run($input, $output);
706+
707+
$this->addToAssertionCount(1);
704708
}
705709

706710
public function testRunReturnsIntegerExitCode()

src/Symfony/Component/Console/Tests/Helper/TableTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function tearDown()
3434
}
3535

3636
/**
37-
* @dataProvider testRenderProvider
37+
* @dataProvider renderProvider
3838
*/
3939
public function testRender($headers, $rows, $style, $expected, $decorated = false)
4040
{
@@ -50,7 +50,7 @@ public function testRender($headers, $rows, $style, $expected, $decorated = fals
5050
}
5151

5252
/**
53-
* @dataProvider testRenderProvider
53+
* @dataProvider renderProvider
5454
*/
5555
public function testRenderAddRows($headers, $rows, $style, $expected, $decorated = false)
5656
{
@@ -66,7 +66,7 @@ public function testRenderAddRows($headers, $rows, $style, $expected, $decorated
6666
}
6767

6868
/**
69-
* @dataProvider testRenderProvider
69+
* @dataProvider renderProvider
7070
*/
7171
public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $decorated = false)
7272
{
@@ -83,7 +83,7 @@ public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $d
8383
$this->assertEquals($expected, $this->getOutputContent($output));
8484
}
8585

86-
public function testRenderProvider()
86+
public function renderProvider()
8787
{
8888
$books = array(
8989
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),

src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ protected function loadFile($file)
385385
}
386386

387387
if (!file_exists($file)) {
388-
throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
388+
throw new InvalidArgumentException(sprintf('The file "%s" does not exist.', $file));
389389
}
390390

391391
if (null === $this->yamlParser) {

src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public function testProcessIgnoresMethodCalls()
114114
$container->register('b')->addMethodCall('setA', array(new Reference('a')));
115115

116116
$this->process($container);
117+
118+
$this->addToAssertionCount(1);
117119
}
118120

119121
protected function process(ContainerBuilder $container)

src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function testProcess()
4848
$container->register('d', 'class')->setSynthetic(true);
4949

5050
$this->process($container);
51+
52+
$this->addToAssertionCount(1);
5153
}
5254

5355
public function testValidTags()
@@ -59,6 +61,8 @@ public function testValidTags()
5961
$container->register('d', 'class')->addTag('foo', array('bar' => 1.1));
6062

6163
$this->process($container);
64+
65+
$this->addToAssertionCount(1);
6266
}
6367

6468
/**

0 commit comments

Comments
 (0)