Completed
Push — master ( b587fb...d05392 )
by David
20:34
created

MockFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateClient() 0 13 1
1
<?php
2
/**
3
 * This file is part of the HttplugBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Http\HttplugBundle\Tests\Unit\ClientFactory;
10
11
use Http\HttplugBundle\ClientFactory\MockFactory;
12
use Http\Mock\Client;
13
use PHPUnit\Framework\TestCase;
14
15
/**
16
 * @author Gary PEGEOT <[email protected]>
17
 */
18
class MockFactoryTest extends TestCase
19
{
20
    public function testCreateClient()
21
    {
22
        $factory = new MockFactory();
23
        $client = $factory->createClient();
24
25
        $this->assertInstanceOf(Client::class, $client);
26
27
        $client = new Client();
28
29
        $factory->setClient($client);
30
31
        $this->assertEquals($client, $factory->createClient());
32
    }
33
}
34