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.

ImageControllerFactoryTest::testFactory()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 10
nc 2
nop 0
1
<?php
2
namespace HtImgModuleTest\Controller\Factory;
3
4
use Zend\ServiceManager\ServiceManager;
5
use HtImgModule\Controller\Factory\ImageControllerFactory;
6
use Zend\Mvc\Controller\ControllerManager;
7
8
class ImageControllerFactoryTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testFactory()
11
    {
12
        $serviceManager = new ServiceManager();
13
        $serviceManager->setService('HtImgModule\Service\ImageService', $this->createMock('HtImgModule\Service\ImageServiceInterface'));
14
        $factory = new ImageControllerFactory();
15
        $controllers = new ControllerManager($serviceManager);
16
17
        // Test with ServiceManager v2
18
        if (!method_exists($serviceManager, 'configure')) {
19
            $controllers->setServiceLocator($serviceManager);
0 ignored issues
show
Deprecated Code introduced by
The method Zend\ServiceManager\Abst...er::setServiceLocator() has been deprecated with message: since 3.0.0. The creation context should be passed during instantiation instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
20
            $this->assertInstanceOf('HtImgModule\Controller\ImageController', $factory->createService($controllers));
21
        } else {
22
            $this->assertInstanceOf('HtImgModule\Controller\ImageController', $factory->createService($serviceManager));
23
        }
24
    }
25
}
26