Skip to content

Commit 5ceff21

Browse files
committed
Clean skippable tests that are never skipped
1 parent c902301 commit 5ceff21

File tree

5 files changed

+0
-34
lines changed

5 files changed

+0
-34
lines changed

Tests/Command/DebugCommandTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,6 @@ public function testWithFilter()
299299
*/
300300
public function testComplete(array $input, array $expectedSuggestions)
301301
{
302-
if (!class_exists(CommandCompletionTester::class)) {
303-
$this->markTestSkipped('Test command completion requires symfony/console 5.4+.');
304-
}
305-
306302
$projectDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures';
307303
$loader = new FilesystemLoader([], $projectDir);
308304
$environment = new Environment($loader);

Tests/Command/LintCommandTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ public function testLintAutodetectsGithubActionEnvironment()
141141
*/
142142
public function testComplete(array $input, array $expectedSuggestions)
143143
{
144-
if (!class_exists(CommandCompletionTester::class)) {
145-
$this->markTestSkipped('Test command completion requires symfony/console 5.4+.');
146-
}
147-
148144
$tester = new CommandCompletionTester($this->createCommand());
149145

150146
$this->assertSame($expectedSuggestions, $tester->complete($input));

Tests/Extension/HttpFoundationExtensionTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ public function getGenerateAbsoluteUrlData()
6060
*/
6161
public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected)
6262
{
63-
if (!class_exists(RequestContext::class)) {
64-
$this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.');
65-
}
66-
6763
$requestContext = new RequestContext($baseUrl, 'GET', $host, $scheme, $httpPort, $httpsPort, $path);
6864
$extension = new HttpFoundationExtension(new UrlHelper(new RequestStack(), $requestContext));
6965

@@ -75,10 +71,6 @@ public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host
7571
*/
7672
public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path)
7773
{
78-
if (!class_exists(RequestContext::class)) {
79-
$this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.');
80-
}
81-
8274
$extension = new HttpFoundationExtension(new UrlHelper(new RequestStack()));
8375

8476
$this->assertEquals($path, $extension->generateAbsoluteUrl($path));
@@ -118,10 +110,6 @@ public function testGenerateAbsoluteUrlWithScriptFileName()
118110
*/
119111
public function testGenerateRelativePath($expected, $path, $pathinfo)
120112
{
121-
if (!method_exists(Request::class, 'getRelativeUriForPath')) {
122-
$this->markTestSkipped('Your version of Symfony HttpFoundation is too old.');
123-
}
124-
125113
$stack = new RequestStack();
126114
$stack->push(Request::create($pathinfo));
127115
$extension = new HttpFoundationExtension(new UrlHelper($stack));

Tests/Extension/HttpKernelExtensionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ public function testUnknownFragmentRenderer()
5858

5959
public function testGenerateFragmentUri()
6060
{
61-
if (!class_exists(FragmentUriGenerator::class)) {
62-
$this->markTestSkipped('HttpKernel 5.3+ is required');
63-
}
64-
6561
$requestStack = new RequestStack();
6662
$requestStack->push(Request::create('/'));
6763

Tests/Extension/WorkflowExtensionTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ class WorkflowExtensionTest extends TestCase
3030

3131
protected function setUp(): void
3232
{
33-
if (!class_exists(Workflow::class)) {
34-
$this->markTestSkipped('The Workflow component is needed to run tests for this extension.');
35-
}
36-
3733
$places = ['ordered', 'waiting_for_payment', 'processed'];
3834
$transitions = [
3935
$this->t1 = new Transition('t1', 'ordered', 'waiting_for_payment'),
@@ -110,9 +106,6 @@ public function testGetMarkedPlaces()
110106

111107
public function testGetMetadata()
112108
{
113-
if (!class_exists(InMemoryMetadataStore::class)) {
114-
$this->markTestSkipped('This test requires symfony/workflow:4.1.');
115-
}
116109
$subject = new Subject();
117110

118111
$this->assertSame('workflow title', $this->extension->getMetadata($subject, 'title'));
@@ -124,9 +117,6 @@ public function testGetMetadata()
124117

125118
public function testbuildTransitionBlockerList()
126119
{
127-
if (!class_exists(TransitionBlockerList::class)) {
128-
$this->markTestSkipped('This test requires symfony/workflow:4.1.');
129-
}
130120
$subject = new Subject();
131121

132122
$list = $this->extension->buildTransitionBlockerList($subject, 't1');

0 commit comments

Comments
 (0)