Skip to content

Commit f3ccf44

Browse files
committed
Remove obsolete tests and skipping conditions
1 parent 1dc48d6 commit f3ccf44

File tree

153 files changed

+126
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+126
-601
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,6 @@ public function testFunctionThatExistsOn72AndLater(): void
411411

412412
public function testBug4715(): void
413413
{
414-
if (PHP_VERSION_ID < 70400) {
415-
$this->markTestSkipped('Test requires PHP 7.4.');
416-
}
417414
$errors = $this->runAnalyse(__DIR__ . '/data/bug-4715.php');
418415
$this->assertNoErrors($errors);
419416
}
@@ -1368,9 +1365,6 @@ public function testBug10979(): void
13681365

13691366
public function testBug11026(): void
13701367
{
1371-
if (PHP_VERSION_ID < 70300) {
1372-
$this->markTestSkipped('Test requires PHP 7.3.');
1373-
}
13741368
$errors = $this->runAnalyse(__DIR__ . '/data/bug-11026.php');
13751369
$this->assertNoErrors($errors);
13761370
}

tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8914,9 +8914,6 @@ public function testPhp73Functions(
89148914
string $expression,
89158915
): void
89168916
{
8917-
if (PHP_VERSION_ID < 70300) {
8918-
$this->markTestSkipped('Test requires PHP 7.3');
8919-
}
89208917
$this->assertTypes(
89218918
__DIR__ . '/data/php73_functions.php',
89228919
$description,
@@ -9046,9 +9043,6 @@ public function testPhp74Functions(
90469043
string $expression,
90479044
): void
90489045
{
9049-
if (PHP_VERSION_ID < 70400) {
9050-
$this->markTestSkipped('Test requires PHP 7.4');
9051-
}
90529046
$this->assertTypes(
90539047
__DIR__ . '/data/php74_functions.php',
90549048
$description,
@@ -9480,34 +9474,6 @@ public function testArraySpread(
94809474
);
94819475
}
94829476

9483-
public function dataPhp74FunctionsIn73(): array
9484-
{
9485-
return [
9486-
[
9487-
'mixed',
9488-
'password_algos()',
9489-
],
9490-
];
9491-
}
9492-
9493-
/**
9494-
* @dataProvider dataPhp74FunctionsIn73
9495-
*/
9496-
public function testPhp74FunctionsIn73(
9497-
string $description,
9498-
string $expression,
9499-
): void
9500-
{
9501-
if (PHP_VERSION_ID >= 70400) {
9502-
$this->markTestSkipped('Test does not run on PHP >= 7.4.');
9503-
}
9504-
$this->assertTypes(
9505-
__DIR__ . '/data/die-73.php',
9506-
$description,
9507-
$expression,
9508-
);
9509-
}
9510-
95119477
public function dataPhp74FunctionsIn74(): array
95129478
{
95139479
return [
@@ -9526,9 +9492,6 @@ public function testPhp74FunctionsIn74(
95269492
string $expression,
95279493
): void
95289494
{
9529-
if (PHP_VERSION_ID < 70400) {
9530-
$this->markTestSkipped('Test requires PHP 7.4.');
9531-
}
95329495
$this->assertTypes(
95339496
__DIR__ . '/data/die-74.php',
95349497
$description,

tests/PHPStan/Analyser/NodeScopeResolverTest.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function dataFileAsserts(): iterable
2020
yield from $this->gatherAssertTypes(__DIR__ . '/data/enum-reflection-php81.php');
2121
}
2222

23-
if (PHP_VERSION_ID < 80000 && PHP_VERSION_ID >= 70400) {
23+
if (PHP_VERSION_ID < 80000) {
2424
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-4902.php');
2525
}
2626

@@ -29,8 +29,6 @@ public function dataFileAsserts(): iterable
2929
yield from $this->gatherAssertTypes(__DIR__ . '/data/mb-strlen-php82.php');
3030
} elseif (PHP_VERSION_ID >= 80000) {
3131
yield from $this->gatherAssertTypes(__DIR__ . '/data/mb-strlen-php8.php');
32-
} elseif (PHP_VERSION_ID < 70300) {
33-
yield from $this->gatherAssertTypes(__DIR__ . '/data/mb-strlen-php72.php');
3432
} else {
3533
yield from $this->gatherAssertTypes(__DIR__ . '/data/mb-strlen-php73.php');
3634
}
@@ -69,9 +67,7 @@ public function dataFileAsserts(): iterable
6967

7068
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Functions/data/varying-acceptor.php');
7169
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/bug-4415.php');
72-
if (PHP_VERSION_ID >= 70400) {
73-
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/bug-5372.php');
74-
}
70+
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/bug-5372.php');
7571
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Arrays/data/bug-5372_2.php');
7672
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/bug-5562.php');
7773

@@ -85,9 +81,7 @@ public function dataFileAsserts(): iterable
8581
yield from $this->gatherAssertTypes(__DIR__ . '/data/new-in-initializers-runtime.php');
8682
}
8783

88-
if (PHP_VERSION_ID >= 70400) {
89-
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-6473.php');
90-
}
84+
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-6473.php');
9185

9286
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/filter-iterator-child-class.php');
9387

@@ -125,9 +119,7 @@ public function dataFileAsserts(): iterable
125119
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Arrays/data/bug-7469.php');
126120
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Variables/data/bug-3391.php');
127121

128-
if (PHP_VERSION_ID >= 70400) {
129-
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Functions/data/bug-anonymous-function-method-constant.php');
130-
}
122+
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Functions/data/bug-anonymous-function-method-constant.php');
131123

132124
if (PHP_VERSION_ID >= 80200) {
133125
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/true-typehint.php');

tests/PHPStan/Analyser/ParameterClosureTypeExtensionArrowFunctionTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
namespace PHPStan\Analyser;
44

55
use PHPStan\Testing\TypeInferenceTestCase;
6-
use const PHP_VERSION_ID;
76

87
class ParameterClosureTypeExtensionArrowFunctionTest extends TypeInferenceTestCase
98
{
109

1110
public function dataFileAsserts(): iterable
1211
{
13-
if (PHP_VERSION_ID < 70400) {
14-
return [];
15-
}
16-
1712
yield from $this->gatherAssertTypes(__DIR__ . '/data/parameter-closure-type-extension-arrow-function.php');
1813
}
1914

@@ -27,10 +22,6 @@ public function testFileAsserts(
2722
...$args,
2823
): void
2924
{
30-
if (PHP_VERSION_ID < 70400) {
31-
$this->markTestSkipped('Test requires PHP 7.4.');
32-
}
33-
3425
$this->assertFileAsserts($assertType, $file, ...$args);
3526
}
3627

tests/PHPStan/Analyser/data/array-spread.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ArraySpreadOperator;
44

tests/PHPStan/Analyser/data/arrow-functions-inside.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ArrowFunctionsInside;
44

tests/PHPStan/Analyser/data/arrow-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ArrowFunctions;
44

tests/PHPStan/Analyser/data/bug-4902.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace Bug4902;
44

tests/PHPStan/Analyser/data/coalesce-assign.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace CoalesceAssign;
44

tests/PHPStan/Analyser/data/die-73.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/PHPStan/Analyser/data/mb-strlen-php72.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

tests/PHPStan/Analyser/data/property-native-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace PropertyNativeTypes;
44

tests/PHPStan/Analyser/nsrt/array-filter-arrow-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ArrayFilterArrowFunctions;
44

tests/PHPStan/Analyser/nsrt/arrow-function-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ArrowFunctionTypes;
44

tests/PHPStan/Analyser/nsrt/bug-11311-php72.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/PHPStan/Analyser/nsrt/bug-11311.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace Bug11311;
44

tests/PHPStan/Analyser/nsrt/bug-3276.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace Bug3276;
44

tests/PHPStan/Analyser/nsrt/bug-4188.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace Bug4188Types;
44

tests/PHPStan/Analyser/nsrt/bug-4339.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace Bug4339;
44

tests/PHPStan/Analyser/nsrt/bug-6859.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
declare(strict_types = 1);
44

tests/PHPStan/Analyser/nsrt/callable-in-union.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace CallableInUnion;
44

tests/PHPStan/Analyser/nsrt/filesystem-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace FilesystemFunctions;
44

tests/PHPStan/Analyser/nsrt/isset-coalesce-empty-type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace IssetCoalesceEmptyType;
44

tests/PHPStan/Analyser/nsrt/native-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace NativeTypes;
44

tests/PHPStan/Analyser/nsrt/nullable-closure-parameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace NullableClosureParameter;
44

tests/PHPStan/Analyser/nsrt/param-closure-this.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ParamClosureThis;
44

tests/PHPStan/Analyser/nsrt/predefined-constants-php74.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
use function PHPStan\Testing\assertType;
44

tests/PHPStan/Analyser/nsrt/preg_replace_callback_shapes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace PregReplaceCallbackMatchShapes;
44

tests/PHPStan/Analyser/nsrt/reflection-type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 7.4
1+
<?php
22

33
namespace ReflectionTypeTest;
44

0 commit comments

Comments
 (0)