24 lines
488 B
PHP
24 lines
488 B
PHP
<?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);
|
|
}
|
|
}
|
|
} |