GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

testReturnUpsTradeabilityInstanceUsingIntegrationParameter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 12
loc 12
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Octante\UpsAPIBundle\Tests\Unit\Services;
4
5
/*
6
 * This file is part of the UrbanGarden package.
7
 *
8
 * (c) Issel Guberna <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
use Octante\UpsAPIBundle\Services\TradeabilityFactory;
15
16 View Code Duplication
class TradeabilityFactoryTest 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...
17
{
18
    /**
19
     * when: createIsCalled
20
     * should: returnAnUpsTradeabilityInstance.
21
     */
22
    public function testReturnUpsTradeabilityInstance()
23
    {
24
        $loggerMock = $this->getMock('Psr\Log\LoggerInterface');
25
        $upsTradeabilityInstance = TradeabilityFactory::create(
26
            'accessKey',
27
            'userId',
28
            'password',
29
            $loggerMock
30
        );
31
        $this->assertInstanceOf('Octante\UpsAPIBundle\Library\TradeabilityWrapper', $upsTradeabilityInstance);
32
    }
33
34
    /**
35
     * when: createIsCalled
36
     * with: useIntegration
37
     * should: returnAnUpsTradeabilityInstanceWithUseIntegrationActivated.
38
     */
39
    public function testReturnUpsTradeabilityInstanceUsingIntegrationParameter()
40
    {
41
        $loggerMock = $this->getMock('Psr\Log\LoggerInterface');
42
        $upsTradeabilityInstance = TradeabilityFactory::create(
43
            'accessKey',
44
            'userId',
45
            'password',
46
            $loggerMock,
47
            true
48
        );
49
        $this->assertInstanceOf('Octante\UpsAPIBundle\Library\TradeabilityWrapper', $upsTradeabilityInstance);
50
    }
51
52
    /**
53
     * when: createIsCalled
54
     * with: aRequestClass
55
     * should: returnAnUpsTradeabilityInstanceWithARequestObject.
56
     */
57
    public function testReturnUpsTradeabilityInstanceUsingARequestClass()
58
    {
59
        $loggerMock = $this->getMock('Psr\Log\LoggerInterface');
60
        $upsTradeabilityInstance = TradeabilityFactory::create(
61
            'accessKey',
62
            'userId',
63
            'password',
64
            $loggerMock,
65
            false,
66
            'Ups\Request'
67
        );
68
        $this->assertInstanceOf('Octante\UpsAPIBundle\Library\TradeabilityWrapper', $upsTradeabilityInstance);
69
    }
70
}
71