Code Duplication    Length = 18-18 lines in 4 locations

Tests/Mock/Guzzle3.php 1 location

@@ 7-24 (lines=18) @@
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
7
class Guzzle3Mock extends \PHPUnit_Framework_TestCase
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);
20
21
        $this->assertInstanceOf('CanalTP\\AbstractGuzzle\\Version\\Guzzle3', $guzzle);
22
        $this->assertEquals($baseUri, $guzzle->getBaseUri());
23
    }
24
}
25

Tests/Version/Guzzle3Test.php 1 location

@@ 7-24 (lines=18) @@
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
7
class Guzzle3Test extends \PHPUnit_Framework_TestCase
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);
20
21
        $this->assertInstanceOf('CanalTP\\AbstractGuzzle\\Version\\Guzzle3', $guzzle);
22
        $this->assertEquals($baseUri, $guzzle->getBaseUri());
23
    }
24
}
25

Tests/Version/Guzzle5Test.php 1 location

@@ 7-24 (lines=18) @@
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
7
class Guzzle5Test extends \PHPUnit_Framework_TestCase
8
{
9
    protected function setup()
10
    {
11
        if (5 !== GuzzleFactory::detectGuzzleVersion()) {
12
            $this->markTestSkipped('test for version 5 only');
13
        }
14
    }
15
16
    public function testCreateGuzzleReturnsInitializedInstanceOfAbstractGuzzle()
17
    {
18
        $baseUri = 'http://my-base-url.tld';
19
        $guzzle = GuzzleFactory::createGuzzle($baseUri);
20
21
        $this->assertInstanceOf('CanalTP\\AbstractGuzzle\\Version\\Guzzle5', $guzzle);
22
        $this->assertEquals($baseUri, $guzzle->getBaseUri());
23
    }
24
}
25

Tests/Version/Guzzle6Test.php 1 location

@@ 7-24 (lines=18) @@
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
7
class Guzzle6Test extends \PHPUnit_Framework_TestCase
8
{
9
    protected function setup()
10
    {
11
        if (6 !== GuzzleFactory::detectGuzzleVersion()) {
12
            $this->markTestSkipped('test for version 6 only');
13
        }
14
    }
15
16
    public function testCreateGuzzleReturnsInitializedInstanceOfAbstractGuzzle()
17
    {
18
        $baseUri = 'http://my-base-url.tld';
19
        $guzzle = GuzzleFactory::createGuzzle($baseUri);
20
21
        $this->assertInstanceOf('CanalTP\\AbstractGuzzle\\Version\\Guzzle6', $guzzle);
22
        $this->assertEquals($baseUri, $guzzle->getBaseUri());
23
    }
24
}
25