mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
17 lines
443 B
PHP
17 lines
443 B
PHP
<?php
|
|
|
|
namespace Tests\Support;
|
|
|
|
use App\Models\Actionlog;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use PHPUnit\Framework\Assert;
|
|
use function PHPUnit\Framework\assertEquals;
|
|
|
|
trait AssertHasActionLogs
|
|
{
|
|
public function assertHasTheseActionLogs(Model $item, array $statuses)
|
|
{
|
|
Assert::assertEquals($statuses, $item->assetlog()->orderBy('id')->pluck('action_type')->toArray(), "Failed asserting that action logs match");
|
|
}
|
|
|
|
} |