Skip to content

Commit 98c9760

Browse files
committed
Clean skippable tests that are never skipped
1 parent fba6dcd commit 98c9760

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

Tests/Controller/AbstractControllerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ public function testSubscribedServices()
7979

8080
public function testGetParameter()
8181
{
82-
if (!class_exists(ContainerBag::class)) {
83-
$this->markTestSkipped('ContainerBag class does not exist');
84-
}
85-
8682
$container = new Container(new FrozenParameterBag(['foo' => 'bar']));
8783
$container->set('parameter_bag', new ContainerBag($container));
8884

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
use Symfony\Component\Translation\DependencyInjection\TranslatorPass;
7272
use Symfony\Component\Translation\LocaleSwitcher;
7373
use Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass;
74-
use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader;
7574
use Symfony\Component\Validator\Validation;
7675
use Symfony\Component\Validator\Validator\ValidatorInterface;
7776
use Symfony\Component\Workflow;
@@ -1298,10 +1297,6 @@ public function testValidationMapping()
12981297

12991298
public function testValidationAutoMapping()
13001299
{
1301-
if (!class_exists(PropertyInfoLoader::class)) {
1302-
$this->markTestSkipped('Auto-mapping requires symfony/validation 4.2+');
1303-
}
1304-
13051300
$container = $this->createContainerFromFile('validation_auto_mapping');
13061301
$parameter = [
13071302
'App\\' => ['services' => ['foo', 'bar']],

Tests/Functional/RouterDebugCommandTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ public function testSearchWithThrow()
9292
*/
9393
public function testComplete(array $input, array $expectedSuggestions)
9494
{
95-
if (!class_exists(CommandCompletionTester::class)) {
96-
$this->markTestSkipped('Test command completion requires symfony/console 5.4+.');
97-
}
98-
9995
$tester = new CommandCompletionTester($this->application->get('debug:router'));
10096
$this->assertSame($expectedSuggestions, $tester->complete($input));
10197
}

Tests/Test/WebTestCaseTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\HttpFoundation\Cookie as HttpFoundationCookie;
2424
use Symfony\Component\HttpFoundation\Request;
2525
use Symfony\Component\HttpFoundation\Response;
26-
use Symfony\Component\HttpFoundation\Test\Constraint\ResponseFormatSame;
2726

2827
class WebTestCaseTest extends TestCase
2928
{
@@ -78,10 +77,6 @@ public function testAssertResponseRedirectsWithLocationAndStatusCode()
7877

7978
public function testAssertResponseFormat()
8079
{
81-
if (!class_exists(ResponseFormatSame::class)) {
82-
$this->markTestSkipped('Too old version of HttpFoundation.');
83-
}
84-
8580
$this->getResponseTester(new Response('', 200, ['Content-Type' => 'application/vnd.myformat']))->assertResponseFormatSame('custom');
8681
$this->getResponseTester(new Response('', 200, ['Content-Type' => 'application/ld+json']))->assertResponseFormatSame('jsonld');
8782
$this->getResponseTester(new Response())->assertResponseFormatSame(null);

0 commit comments

Comments
 (0)