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.
29 lines
712 B
PHP
29 lines
712 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Cqs\Actions\Common\ToggleModelStarInput;
|
|
use App\Interfaces\ModelWithStar;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
describe('ToggleModelStarInput', function (): void {
|
|
it('can be instantiated with a model implementing ModelWithStar', function (): void {
|
|
// GIVEN
|
|
$mock = new class () extends Model implements ModelWithStar
|
|
{
|
|
public function setStar(bool $value): void
|
|
{
|
|
}
|
|
|
|
public function toggleStar(): void
|
|
{
|
|
}
|
|
};
|
|
|
|
// WHEN
|
|
$input = new ToggleModelStarInput(model: $mock);
|
|
|
|
// THEN
|
|
expect($input->model)->toBe($mock);
|
|
});
|
|
});
|