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.

ConsoleControllerTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace RbCommentTest\Controller;
3
4
use RbComment\Controller\ConsoleController;
5
use RbComment\Model\CommentTable;
6
use PHPUnit_Framework_TestCase;
7
8
class ConsoleControllerTest extends PHPUnit_Framework_TestCase
9
{
10
    protected $commentTableMock;
11
12
    public function setUp()
13
    {
14
        $this->commentTableMock = $this->createMock(CommentTable::class);
15
    }
16
17
    /**
18
     * @group controller
19
     */
20
    public function testDeleteSpamAction()
21
    {
22
        $deletedCount = rand(1, 100);
23
24
        // Expect this to be called once
25
        $this->commentTableMock->expects($this->once())
26
                               ->method('deleteSpam')
27
                               ->will($this->returnValue($deletedCount));
28
29
        // CommentController Mock
30
        $consoleControllerMock = new ConsoleController($this->commentTableMock);
31
32
        // Capture output
33
        ob_start();
34
        $consoleControllerMock->deleteSpamAction();
35
        $output = ob_get_clean();
36
37
        $this->assertEquals($output, $deletedCount . ' spam comments removed' . PHP_EOL);
38
    }
39
}
40