Completed
Pull Request — master (#5)
by Jean-Baptiste
04:36
created

testCreateGuzzleReturnsInitializedInstanceOfAbstractGuzzle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace CanalTP\AbstractGuzzle\Tests\Version;
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
7 View Code Duplication
class Guzzle3Test extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    protected function setup()
10
    {
11
        if (3 !== GuzzleFactory::detectGuzzleVersion()) {
12
            $this->markTestSkipped('test for version 3 only');
13
        }
14
    }
15
16
    public function testCreateGuzzleReturnsInitializedInstanceOfAbstractGuzzle()
17
    {
18
        $baseUri = 'http://my-base-url.tld';
19
        $guzzle = GuzzleFactory::createGuzzle($baseUri);
0 ignored issues
show
Bug introduced by
The call to createGuzzle() misses a required argument $options.

This check looks for function calls that miss required arguments.

Loading history...
20
21
        $this->assertInstanceOf('CanalTP\\AbstractGuzzle\\Version\\Guzzle3', $guzzle);
22
        $this->assertEquals($baseUri, $guzzle->getBaseUri());
23
    }
24
}
25