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.

IntegrationTest::testDispatch()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 18
Code Lines 8

Duplication

Lines 18
Ratio 100 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 18
loc 18
rs 9.4285
cc 2
eloc 8
nc 1
nop 0
1
<?php
2
/**
3
 * @link    https://github.com/old-town/workflow-zf2-dispatch
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Dispatch\PhpUnit\Test;
7
8
use OldTown\Workflow\ZF2\Dispatch\PhpUnit\TestData\TestPaths;
9
use Zend\Mvc\MvcEvent;
10
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
11
12
13
/**
14
 * Class ModuleTest
15
 *
16
 * @package OldTown\Workflow\ZF2\Dispatch\PhpUnit\Test
17
 */
18 View Code Duplication
class IntegrationTest extends AbstractHttpControllerTestCase
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...
19
{
20
    /**
21
     *
22
     * @return void
23
     */
24
    public function testDispatch()
25
    {
26
        /** @noinspection PhpIncludeInspection */
27
        $this->setApplicationConfig(
28
            include TestPaths::getPathToIntegrationTest()
29
        );
30
31
32
        $this->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $e) {
33
            $exception = $e->getParam('exception', null);
34
            if ($exception) {
35
                throw $exception;
36
            }
37
        });
38
39
40
        $this->dispatch('test');
41
    }
42
}
43