| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function test_cast_metadata_empty() |
||
| 30 | { |
||
| 31 | $repository = \Mockery::mock(Transactions::class)->shouldAllowMockingProtectedMethods()->makePartial(); |
||
| 32 | $repository->shouldReceive('insertQuery')->once()->andReturn(new Insert()); |
||
| 33 | $repository->shouldReceive('performInsert')->once(); |
||
| 34 | $repository->bootTransactionsTrait(); |
||
| 35 | |||
| 36 | $item = new Transaction(); |
||
| 37 | $item->setManager($repository); |
||
| 38 | $item->insert(); |
||
| 39 | |||
| 40 | self::assertSame('{}', $item->getPropertyRaw('metadata')); |
||
| 41 | } |
||
| 43 |