diff --git a/app/test.bootstrap.php b/app/test.bootstrap.php index 5e31ebc..6be992a 100644 --- a/app/test.bootstrap.php +++ b/app/test.bootstrap.php @@ -150,6 +150,7 @@ class TestBootstrap spl_autoload_register(function($className) { $baseTestPath = __DIR__ . "/tests"; $namespaceMap = [ + "ProVM\\Tests\\Extension\\" => "{$baseTestPath}/extension", "ProVM\\Integration\\" => "{$baseTestPath}/integration", "ProVM\\Unit\\" => "{$baseTestPath}/unit/src", "ProVM\\Performance\\" => "{$baseTestPath}/performance", diff --git a/app/tests/integration/AbstractIntegration.php b/app/tests/extension/AbstractIntegration.php similarity index 90% rename from app/tests/integration/AbstractIntegration.php rename to app/tests/extension/AbstractIntegration.php index b33a4c6..cab4e9f 100644 --- a/app/tests/integration/AbstractIntegration.php +++ b/app/tests/extension/AbstractIntegration.php @@ -1,9 +1,9 @@ model; + + foreach ($this->methods as $method) { + $this->assertObjectHasMethod($method, $object); + } + } + + protected array $methods = []; +} \ No newline at end of file diff --git a/app/tests/extension/testPropertiesTrait.php b/app/tests/extension/testPropertiesTrait.php new file mode 100644 index 0000000..adfb367 --- /dev/null +++ b/app/tests/extension/testPropertiesTrait.php @@ -0,0 +1,24 @@ +model; + + $this->assertProperties($model); + } + + protected array $properties = []; + protected function assertProperties(Model $model): void + { + foreach ($this->properties as $key) { + $this->assertObjectHasProperty($key, $model); + } + } +} \ No newline at end of file