TwilioWrapperTest::testCapabilityCreateInstance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 8
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace Vresh\TwilioBundle\Tests\DependencyInjection;
3
4
use Vresh\TwilioBundle\Service\TwilioLookupsWrapper;
5
use Vresh\TwilioBundle\Service\TwilioWrapper,
6
    Vresh\TwilioBundle\Service\TwilioCapabilityWrapper;
7
8
/**
9
 * Test the TwilioWrapper
10
 *
11
 * @author Fridolin Koch <[email protected]>
12
 *
13
 */
14
class TwilioWrapperTest extends \PHPUnit_Framework_TestCase
15
{
16
    /**
17
     * @test
18
     */
19
    public function testTwilioWrapper()
20
    {
21
        $twilio = new TwilioWrapper('AAAA', 'XXXX');
22
        //check if instance
23
        $this->assertInstanceOf('Vresh\TwilioBundle\Service\TwilioWrapper', $twilio);
24
    }
25
26
    /**
27
     * @test
28
     */
29 View Code Duplication
    public function testCreateInstance()
0 ignored issues
show
Duplication introduced by
This method 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...
30
    {
31
        $twilio = new TwilioWrapper('AAAA', 'XXXX');
32
        //create other instance
33
        $otherInstance = $twilio->createInstance('BBBB', 'CCCCC');
34
        //check class
35
        $this->assertInstanceOf('\Services_Twilio', $otherInstance);
36
    }
37
38
    /**
39
     * @test
40
     */
41
    public function testCapabilityWrapper()
42
    {
43
        $twilio = new TwilioCapabilityWrapper('AAAA', 'XXXX');
44
        //check class
45
        $this->assertInstanceOf('\Services_Twilio_Capability', $twilio);
46
    }
47
48
    /**
49
     * @test
50
     */
51 View Code Duplication
    public function testCapabilityCreateInstance()
0 ignored issues
show
Duplication introduced by
This method 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...
52
    {
53
        $twilio = new TwilioCapabilityWrapper('AAAA', 'XXXX');
54
        //create other instance
55
        $otherInstance = $twilio->createInstance('BBBB', 'CCCCC');
56
        //check class
57
        $this->assertInstanceOf('\Services_Twilio_Capability', $otherInstance);
58
    }
59
60
    /**
61
     * @test
62
     */
63
    public function testLookupsWrapper()
64
    {
65
        $twilio = new TwilioLookupsWrapper('AAAA', 'XXXX');
66
        //check class
67
        $this->assertInstanceOf('\Lookups_Services_Twilio', $twilio);
68
    }
69
}
70