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.

testInvokeWillCreateACommentControllerInstance()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 29
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 18
nc 1
nop 0
1
<?php
2
namespace RbCommentTest\Factory\Controller;
3
4
use Interop\Container\ContainerInterface;
5
use PHPUnit_Framework_TestCase;
6
use RbComment\Controller\CommentController;
7
use RbComment\Factory\Controller\CommentControllerFactory;
8
use RbComment\Model\CommentTable;
9
use ZendService\Akismet\Akismet;
10
11
final class CommentControllerFactoryTest extends PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @group factory
15
     */
16
    public function testInvokeWillCreateACommentControllerInstance()
17
    {
18
        $containerMock = $this->createMock(ContainerInterface::class);
19
20
        $configServiceMock  = [uniqid()];
21
        $commentTableMock   = $this->createMock(CommentTable::class);
22
        $akismetServiceMock = $this->createMock(Akismet::class);
23
24
        $commentControllerFactory = new CommentControllerFactory();
25
26
        // Expectations
27
        $containerMock->expects($this->exactly(3))
28
                      ->method('get')
29
                      ->withConsecutive(
30
                          ['Config'],
31
                          [CommentTable::class],
32
                          ['RbComment\Akismet']
33
                      )
34
                      ->willReturnOnConsecutiveCalls(
35
                          $configServiceMock,
36
                          $commentTableMock,
37
                          $akismetServiceMock
38
                      );
39
40
        $controller = $commentControllerFactory($containerMock, CommentController::class);
41
42
        // Assertions
43
        $this->assertInstanceOf(CommentController::class, $controller);
44
    }
45
}
46