1 | <?php |
||
2 | |||
3 | namespace MaksimM\CompositePrimaryKeys\Tests; |
||
4 | |||
5 | use Illuminate\Foundation\Bus\DispatchesJobs; |
||
6 | use MaksimM\CompositePrimaryKeys\Tests\Stubs\TestBinaryRoleHex; |
||
7 | use MaksimM\CompositePrimaryKeys\Tests\Stubs\TestSingleBinaryKeyJob; |
||
8 | use MaksimM\CompositePrimaryKeys\Tests\Stubs\TestUser; |
||
9 | |||
10 | class SingleKeyModelSerializationTest extends CompositeKeyBaseUnit |
||
11 | { |
||
12 | use DispatchesJobs; |
||
13 | |||
14 | /** @test */ |
||
15 | public function testModelSerialization() |
||
16 | { |
||
17 | /** |
||
18 | * @var TestUser $model |
||
19 | */ |
||
20 | $model = TestBinaryRoleHex::first(); |
||
21 | $this->assertEquals('Foo', $model->name); |
||
22 | $job = new TestSingleBinaryKeyJob($model); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
23 | $this->dispatch($job); |
||
24 | $model->refresh(); |
||
25 | $this->assertEquals('Bar', $model->name); |
||
26 | } |
||
27 | } |
||
28 |