Skip to content

Commit 2075d31

Browse files
committed
minor #19466 Minor fixes (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19466). Discussion ---------- Minor fixes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 774c984 Minor fixes
2 parents bdfc2aa + 774c984 commit 2075d31

File tree

24 files changed

+15
-42
lines changed

24 files changed

+15
-42
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Twig\Tests\Extension;
1313

1414
use Symfony\Bridge\Twig\Extension\ExpressionExtension;
15-
use Symfony\Component\ExpressionLanguage\Expression;
1615

1716
class ExpressionExtensionTest extends \PHPUnit_Framework_TestCase
1817
{

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\Finder\Finder;
2424
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2525
use Symfony\Component\Config\FileLocator;
26-
use Symfony\Component\Validator\Validation;
2726

2827
/**
2928
* FrameworkExtension.

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
1919
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2020
use Symfony\Component\DependencyInjection\Reference;
21-
use Symfony\Component\Validator\Validation;
2221

2322
abstract class FrameworkExtensionTest extends TestCase
2423
{

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function welcomeAction(Request $request, $name = null)
4242

4343
public function logoutAction(Request $request)
4444
{
45-
$request->getSession('session')->invalidate();
45+
$request->getSession()->invalidate();
4646

4747
return new Response('Session cleared.');
4848
}

src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105

106106
return 1;
107107
}
108-
$passwordQuestion = $this->createPasswordQuestion($input, $output);
108+
$passwordQuestion = $this->createPasswordQuestion();
109109
$password = $output->askQuestion($passwordQuestion);
110110
}
111111

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,6 @@ protected function getConsoleOutput($stderr)
248248
return $output;
249249
}
250250

251-
private function hasStderrSupport()
252-
{
253-
return false === $this->isRunningOS400();
254-
}
255-
256251
private function hasSttyAvailable()
257252
{
258253
exec('stty 2>&1', $output, $exitcode);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Debug\DebugClassLoader;
1515
use Symfony\Component\Debug\ErrorHandler;
16-
use Symfony\Component\Debug\Exception\ContextErrorException;
1716

1817
class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
1918
{

src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

1414
use Symfony\Component\DependencyInjection\Alias;
15-
use Symfony\Component\DependencyInjection\Definition;
1615
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
1716
use Symfony\Component\DependencyInjection\Reference;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testProcess()
5151
$this->assertSame('b_alias', $aDefinition->getFactoryService(false));
5252
$this->assertTrue($container->has('container'));
5353

54-
$resolvedFactory = $aDefinition->getFactory(false);
54+
$resolvedFactory = $aDefinition->getFactory();
5555
$this->assertSame('b_alias', (string) $resolvedFactory[0]);
5656
}
5757

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testGet()
100100
try {
101101
@$builder->get('baz');
102102
$this->fail('->get() throws a ServiceCircularReferenceException if the service has a circular reference to itself');
103-
} catch (\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) {
103+
} catch (ServiceCircularReferenceException $e) {
104104
$this->assertEquals('Circular reference detected for service "baz", path: "baz".', $e->getMessage(), '->get() throws a LogicException if the service has a circular reference to itself');
105105
}
106106

src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Symfony\Component\DependencyInjection\ContainerBuilder;
66
use Symfony\Component\DependencyInjection\Reference;
7-
use Symfony\Component\ExpressionLanguage\Expression;
87

98
$container = new ContainerBuilder();
109
$container->

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
16-
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1716
use Symfony\Component\DependencyInjection\Reference;
1817
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1918
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

src/Symfony/Component/DomCrawler/Tests/FormTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DomCrawler\Form;
1515
use Symfony\Component\DomCrawler\FormFieldRegistry;
16-
use Symfony\Component\DomCrawler\Field;
1716

1817
class FormTest extends \PHPUnit_Framework_TestCase
1918
{

src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Form\Tests\Extension\Core\Type;
1313

14-
use Symfony\Component\Form\Form;
1514
use Symfony\Component\Form\Tests\Fixtures\Author;
1615
use Symfony\Component\Form\Tests\Fixtures\AuthorType;
1716

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testWrongTableOptionsRead()
5858
{
5959
$storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'bad_name'));
6060
$this->setExpectedException('RuntimeException');
61-
$storage->read('foo', 'bar');
61+
$storage->read('foo');
6262
}
6363

6464
public function testWriteRead()

src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests\EventListener;
1313

14-
use Symfony\Component\HttpFoundation\RequestStack;
1514
use Symfony\Component\HttpFoundation\Request;
1615
use Symfony\Component\HttpKernel\EventListener\LocaleListener;
1716
use Symfony\Component\HttpKernel\HttpKernelInterface;

src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests\EventListener;
1313

14-
use Symfony\Component\HttpFoundation\RequestStack;
1514
use Symfony\Component\HttpFoundation\Request;
1615
use Symfony\Component\HttpKernel\EventListener\RouterListener;
1716
use Symfony\Component\HttpKernel\HttpKernelInterface;

src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command;
44

55
use Symfony\Component\Console\Command\Command;
6-
use Symfony\Component\HttpKernel\Bundle;
76

87
/**
98
* This command has a required parameter on the constructor and will be ignored by the default Bundle implementation.

src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ public function testParseTypeInt32($value, $expected, $message = '')
656656
{
657657
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
658658
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_INT32);
659-
$this->assertSame($expected, $parsedValue);
659+
$this->assertSame($expected, $parsedValue, $message);
660660
}
661661

662662
public function parseTypeInt32Provider()

src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ public function testIsReadable($collection, $path)
8181
*/
8282
public function testIsWritable($collection, $path)
8383
{
84-
$this->assertTrue($this->propertyAccessor->isWritable($collection, $path, 'Updated'));
84+
$this->assertTrue($this->propertyAccessor->isWritable($collection, $path));
8585
}
8686
}

src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,33 +166,25 @@ public function testSetValueFailsIfNoAdderNorRemoverFound()
166166
public function testIsWritableReturnsTrueIfAdderAndRemoverExists()
167167
{
168168
$car = $this->getMock(__CLASS__.'_Car');
169-
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
170-
171-
$this->assertTrue($this->propertyAccessor->isWritable($car, 'axes', $axes));
169+
$this->assertTrue($this->propertyAccessor->isWritable($car, 'axes'));
172170
}
173171

174172
public function testIsWritableReturnsFalseIfOnlyAdderExists()
175173
{
176174
$car = $this->getMock(__CLASS__.'_CarOnlyAdder');
177-
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
178-
179-
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
175+
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
180176
}
181177

182178
public function testIsWritableReturnsFalseIfOnlyRemoverExists()
183179
{
184180
$car = $this->getMock(__CLASS__.'_CarOnlyRemover');
185-
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
186-
187-
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
181+
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
188182
}
189183

190184
public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists()
191185
{
192186
$car = $this->getMock(__CLASS__.'_CarNoAdderAndRemover');
193-
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
194-
195-
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
187+
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
196188
}
197189

198190
/**

src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Core\Tests;
1313

14-
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
15-
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
1614
use Symfony\Component\Security\Core\SecurityContext;
1715

1816
/**

src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testGetInvalidEngine()
121121
$secondEngine = $this->getEngineMock('template.php', false);
122122

123123
$delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine));
124-
$delegatingEngine->getEngine('template.php', array('foo' => 'bar'));
124+
$delegatingEngine->getEngine('template.php');
125125
}
126126

127127
private function getEngineMock($template, $supports)

src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
3737
*/
3838
public function testFailedLangcodes($nplural, $langCodes)
3939
{
40-
$matrix = $this->generateTestData($nplural, $langCodes);
40+
$matrix = $this->generateTestData($langCodes);
4141
$this->validateMatrix($nplural, $matrix, false);
4242
}
4343

@@ -46,7 +46,7 @@ public function testFailedLangcodes($nplural, $langCodes)
4646
*/
4747
public function testLangcodes($nplural, $langCodes)
4848
{
49-
$matrix = $this->generateTestData($nplural, $langCodes);
49+
$matrix = $this->generateTestData($langCodes);
5050
$this->validateMatrix($nplural, $matrix);
5151
}
5252

@@ -108,7 +108,7 @@ protected function validateMatrix($nplural, $matrix, $expectSuccess = true)
108108
}
109109
}
110110

111-
protected function generateTestData($plural, $langCodes)
111+
protected function generateTestData($langCodes)
112112
{
113113
$matrix = array();
114114
foreach ($langCodes as $langCode) {

0 commit comments

Comments
 (0)