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.

testInvokeWillCreateACommentInstance()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 38
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 38
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 24
nc 1
nop 0
1
<?php
2
namespace RbCommentTest\Factory\View\Helper;
3
4
use Interop\Container\ContainerInterface;
5
use PHPUnit_Framework_TestCase;
6
use RbComment\Factory\View\Helper\CommentFactory;
7
use RbComment\Model\CommentTable;
8
use RbComment\View\Helper\Comment;
9
10
final class CommentFactoryTest extends PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * @group factory
14
     */
15
    public function testInvokeWillCreateACommentInstance()
16
    {
17
        $containerMock = $this->createMock(ContainerInterface::class);
18
19
        $viewHelperManagerMock =
20
            $this->getMockBuilder('ViewHelperManager')
21
                 ->setMethods(['get'])
22
                 ->getMock();
23
24
        $routerMock = $this->getMockBuilder('Router')->getMock();
25
26
        $configMock = [uniqid()];
27
28
        $commentTableMock = $this->createMock(CommentTable::class);
29
30
        $factory = new CommentFactory();
31
32
        // Expectations
33
        $containerMock->expects($this->exactly(4))
34
                      ->method('get')
35
                      ->withConsecutive(
36
                          ['ViewHelperManager'],
37
                          ['Router'],
38
                          ['Config'],
39
                          [CommentTable::class]
40
                      )
41
                      ->willReturnOnConsecutiveCalls(
42
                          $viewHelperManagerMock,
43
                          $routerMock,
44
                          $configMock,
45
                          $commentTableMock
46
                      );
47
48
        $table = $factory($containerMock, Comment::class);
49
50
        // Assertions
51
        $this->assertInstanceOf(Comment::class, $table);
52
    }
53
}
54