Skip to content

Commit 869cc7f

Browse files
committed
refactor: replace property with class constant
1 parent 0ce4ffa commit 869cc7f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/Drafts/BaseDraftTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
abstract class BaseDraftTestCase extends BaseTestCase
1010
{
1111
/** @var string */
12-
protected $relativeTestsRoot = '/../../vendor/json-schema/json-schema-test-suite/tests';
12+
protected const RELATIVE_TESTS_ROOT = '/../../vendor/json-schema/json-schema-test-suite/tests';
1313

1414
/**
1515
* @return array<string, array{string, string}>

tests/Drafts/Draft3Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public function refPreventsASiblingIdFromChangingTheBaseUriProvider(): \Generato
7676
protected function getFilePaths(): array
7777
{
7878
return [
79-
realpath(__DIR__ . $this->relativeTestsRoot . '/draft3'),
80-
realpath(__DIR__ . $this->relativeTestsRoot . '/draft3/optional')
79+
realpath(__DIR__ . self::RELATIVE_TESTS_ROOT . '/draft3'),
80+
realpath(__DIR__ . self::RELATIVE_TESTS_ROOT . '/draft3/optional')
8181
];
8282
}
8383

tests/Drafts/Draft4Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Draft4Test extends BaseDraftTestCase
2323
protected function getFilePaths(): array
2424
{
2525
return [
26-
realpath(__DIR__ . $this->relativeTestsRoot . '/draft4'),
27-
realpath(__DIR__ . $this->relativeTestsRoot . '/draft4/optional')
26+
realpath(__DIR__ . self::RELATIVE_TESTS_ROOT . '/draft4'),
27+
realpath(__DIR__ . self::RELATIVE_TESTS_ROOT . '/draft4/optional')
2828
];
2929
}
3030

0 commit comments

Comments
 (0)