Passed
Push — master ( e1ded7...51c993 )
by Gabriel
03:12 queued 11s
created

test_createSendgridTransport()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Nip\Mail\Tests;
4
5
use Mockery\Mock;
6
use Nip\Mail\Transport\SendgridTransport;
7
use Nip\Mail\TransportManager;
8
9
/**
10
 * Class TransportManagerTest
11
 * @package Nip\Mail\Tests
12
 */
13
class TransportManagerTest extends AbstractTest
14
{
15
    public function test_transport_returnDefaultDriver()
16
    {
17
        /** @var TransportManager|Mock $manager */
18
        $manager = \Mockery::mock(TransportManager::class)->shouldAllowMockingProtectedMethods()->makePartial();
19
        $manager->shouldReceive('resolve')->with('smtp')->once()->andReturn(true);
20
21
        self::assertSame($manager->transport(), $manager->transport());
22
    }
23
24
    public function test_createSendgridTransport()
25
    {
26
        $manager = new TransportManager();
27
        $this->loadConfiguration();
28
29
        $sendgrid = $manager->transport('sendgrid');
30
        self::assertInstanceOf(SendgridTransport::class, $sendgrid);
31
    }
32
}
33