ldc-cocotte/tests/Unit/App/Actions/Common/ToggleModelStatusInputTest.php
Jérémy Munsch d0efb0f527
refactor: update namespaces for actions and queries
Refactored the codebase to change the namespaces of various actions and queries from `App\Actions` to `App\Cqs\Actions` and `App\Queries` to `App\Cqs\Queries`. This restructuring improves organization and clarity in the codebase.
2026-11-10 15:13:26 +01:00

29 lines
728 B
PHP

<?php
declare(strict_types=1);
use App\Cqs\Actions\Common\ToggleModelStatusInput;
use App\Interfaces\ModelWithStatus;
use Illuminate\Database\Eloquent\Model;
describe('ToggleModelStatusInput', function (): void {
it('can be instantiated with a model implementing ModelWithStatus', function (): void {
// GIVEN
$mock = new class () extends Model implements ModelWithStatus
{
public function setStatus(bool $value): void
{
}
public function toggleStatus(): void
{
}
};
// WHEN
$input = new ToggleModelStatusInput(model: $mock);
// THEN
expect($input->model)->toBe($mock);
});
});