Se mueve todo a extension de pruebas
This commit is contained in:
24
app/tests/extension/testPropertiesTrait.php
Normal file
24
app/tests/extension/testPropertiesTrait.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace ProVM\Tests\Extension;
|
||||
|
||||
use Incoviba\Common\Define\Model;
|
||||
|
||||
trait testPropertiesTrait
|
||||
{
|
||||
use ObjectHasMethodTrait;
|
||||
|
||||
public function testProperties(): void
|
||||
{
|
||||
$model = $this->model;
|
||||
|
||||
$this->assertProperties($model);
|
||||
}
|
||||
|
||||
protected array $properties = [];
|
||||
protected function assertProperties(Model $model): void
|
||||
{
|
||||
foreach ($this->properties as $key) {
|
||||
$this->assertObjectHasProperty($key, $model);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user