diff --git a/.phpstan/constants.php b/.phpstan/constants.php index a5eeecfa..1f5f9bb3 100644 --- a/.phpstan/constants.php +++ b/.phpstan/constants.php @@ -3,3 +3,6 @@ define('NAILS_COMMON_PATH', './'); define('NAILS_CI_SYSTEM_PATH', NAILS_COMMON_PATH . 'vendor/pocketarc/codeigniter/system/'); define('BASEPATH', NAILS_CI_SYSTEM_PATH); +define('NAILS_DB_PREFIX', 'nails_'); + +require_once dirname(__DIR__) . '/src/FindReplace/Interfaces/Exclusion.php'; diff --git a/src/Common/FindReplace/Exclusion/Package.php b/src/Common/FindReplace/Exclusion/Package.php new file mode 100644 index 00000000..bad867c9 --- /dev/null +++ b/src/Common/FindReplace/Exclusion/Package.php @@ -0,0 +1,20 @@ + + */ + public function hidden(): array; + + /** + * Searched and shown, never replaced. Same entry format as hidden(). + * + * @return list + */ + public function readOnly(): array; +} diff --git a/tests/FindReplace/Exclusion/PackageTest.php b/tests/FindReplace/Exclusion/PackageTest.php new file mode 100644 index 00000000..7cd45e15 --- /dev/null +++ b/tests/FindReplace/Exclusion/PackageTest.php @@ -0,0 +1,34 @@ +hidden() + ); + } + + public function testReadOnly(): void + { + self::assertSame( + [], + (new Package())->readOnly() + ); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 12a66d50..4c88e682 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -63,3 +63,5 @@ Testing::bootstrapModule(__FILE__); } + +require_once dirname(__DIR__) . '/src/FindReplace/Interfaces/Exclusion.php';