Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function test_sent_no_on_insert() |
||
18 | { |
||
19 | $email = new Email(); |
||
20 | |||
21 | /** @var Emails|Mock $emails */ |
||
22 | $emails = \Mockery::mock(Emails::class)->shouldAllowMockingProtectedMethods()->makePartial(); |
||
23 | $emails->shouldReceive('insertQuery')->andReturn(new Insert()); |
||
24 | $emails->shouldReceive('performInsert')->andReturn(true); |
||
25 | |||
26 | $emails->bootEmailsTrait(); |
||
27 | |||
28 | $emails->insert($email); |
||
29 | self::assertSame('no', $email->get('sent')); |
||
30 | } |
||
31 | } |