Skip to content

Commit 295a8e0

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [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 b3f341f + 65260bc commit 295a8e0

37 files changed

+221
-117
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ public function testThemeBlockInheritanceUsingDynamicExtend()
105105

106106
$renderer = $this->extension->renderer;
107107
$renderer->setTheme($view, array('page_dynamic_extends.html.twig'));
108-
$renderer->searchAndRenderBlock($view, 'row');
108+
109+
$this->assertMatchesXpath(
110+
$renderer->searchAndRenderBlock($view, 'row'),
111+
'/div/label[text()="child"]'
112+
);
109113
}
110114

111115
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/Component/Console/Tests/ApplicationTest.php

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

711+
$this->addToAssertionCount(1);
712+
711713
$input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar'));
712714
$application->run($input, $output);
715+
716+
$this->addToAssertionCount(1);
713717
}
714718

715719
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
@@ -353,7 +353,7 @@ protected function loadFile($file)
353353
}
354354

355355
if (!file_exists($file)) {
356-
throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
356+
throw new InvalidArgumentException(sprintf('The file "%s" does not exist.', $file));
357357
}
358358

359359
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
@@ -85,6 +85,8 @@ public function testProcess()
8585
$container->register('d', 'class')->setSynthetic(true);
8686

8787
$this->process($container);
88+
89+
$this->addToAssertionCount(1);
8890
}
8991

9092
public function testValidTags()
@@ -96,6 +98,8 @@ public function testValidTags()
9698
$container->register('d', 'class')->addTag('foo', array('bar' => 1.1));
9799

98100
$this->process($container);
101+
102+
$this->addToAssertionCount(1);
99103
}
100104

101105
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public function testProcess()
2828
->addArgument(new Reference('b'))
2929
;
3030
$container->register('b', '\stdClass');
31+
32+
$this->process($container);
33+
34+
$this->addToAssertionCount(1);
3135
}
3236

3337
/**

0 commit comments

Comments
 (0)