From 24daf3ae83880829b43c6e348b247fcbddc0e2c3 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 25 Jul 2022 16:35:28 +1200 Subject: [PATCH] MNT Skip test if Page class missing --- tests/php/Dev/Validation/RelationValidationTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/php/Dev/Validation/RelationValidationTest.php b/tests/php/Dev/Validation/RelationValidationTest.php index b609b68f0..adc8022e9 100644 --- a/tests/php/Dev/Validation/RelationValidationTest.php +++ b/tests/php/Dev/Validation/RelationValidationTest.php @@ -51,6 +51,9 @@ class RelationValidationTest extends SapphireTest */ public function testIgnoredClass(string $class, ?string $relation, array $config, bool $expected): void { + if (!class_exists($class)) { + $this->markTestSkipped("This test requires the $class class"); + } $service = RelationValidationService::singleton(); foreach ($config as $name => $value) {