Skip to content

Commit 573e2ac

Browse files
committed
Fixed build
1 parent 08e4a13 commit 573e2ac

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/Reflection/Nette/NetteObjectClassReflectionExtensionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function dataHasMethod(): array
5454
*/
5555
public function testHasMethod(string $className, string $method, bool $result): void
5656
{
57+
if (!class_exists('Nette\LegacyObject')) {
58+
self::markTestSkipped(sprintf('%s does not exist.', $className));
59+
}
5760
$classReflection = $this->broker->getClass($className);
5861
self::assertSame($result, $this->extension->hasMethod($classReflection, $method));
5962
}
@@ -96,6 +99,9 @@ public function dataHasProperty(): array
9699
*/
97100
public function testHasProperty(string $className, string $property, bool $result): void
98101
{
102+
if (!class_exists('Nette\LegacyObject')) {
103+
self::markTestSkipped(sprintf('%s does not exist.', $className));
104+
}
99105
$classReflection = $this->broker->getClass($className);
100106
self::assertSame($result, $this->extension->hasProperty($classReflection, $property));
101107
}

tests/Rule/Nette/DoNotExtendNetteObjectRuleTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public function testSmartObjectChild(): void
1919

2020
public function testNetteObjectChild(): void
2121
{
22+
if (!class_exists('Nette\LegacyObject')) {
23+
self::markTestSkipped('LegacyObject does no longer exist.');
24+
}
2225
$this->analyse([__DIR__ . '/../../NetteObjectChild.php'], [
2326
[
2427
'Class PHPStan\NetteObjectChild extends Nette\Object - it\'s better to use Nette\SmartObject trait.',

0 commit comments

Comments
 (0)