11 lines
300 B
PHP
11 lines
300 B
PHP
|
<?php
|
||
|
namespace Tests\Extension;
|
||
|
|
||
|
trait ObjectHasMethodTrait
|
||
|
{
|
||
|
public function assertObjectHasMethod(string $method, object $object): void
|
||
|
{
|
||
|
$this->assertTrue(method_exists($object, $method), sprintf('The object %s does not have the method %s', get_class($object), $method));
|
||
|
}
|
||
|
}
|