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.
Completed
Pull Request — master (#9)
by Mario
07:30
created

TextTest::setUp()   A

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
3
namespace Netgen\Bundle\OpenGraphBundle\Tests\Handler\Literal;
4
5
use Netgen\Bundle\OpenGraphBundle\Handler\HandlerInterface;
6
use Netgen\Bundle\OpenGraphBundle\Handler\Literal\Text;
7
use Netgen\Bundle\OpenGraphBundle\MetaTag\Item;
8
use PHPUnit\Framework\TestCase;
9
10
class TextTest extends TestCase
11
{
12
    /**
13
     * @var Text
14
     */
15
    protected $text;
16
17
    public function setUp()
18
    {
19
        $this->text = new Text();
20
    }
21
22
    public function testInstanceOfHandlerInterface()
23
    {
24
        $this->assertInstanceOf(HandlerInterface::class, $this->text);
25
    }
26
27
    /**
28
     * @expectedException \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
29
     * @expectedExceptionMessage Argument '$params[0]' is invalid: Literal text handler requires the text to output.
30
     */
31
    public function testGettingTagsWithEmptyParams()
32
    {
33
        $this->text->getMetaTags('some_tag', array());
34
    }
35
36
    public function testGettingTagsWithValidResult()
37
    {
38
        $result = $this->text->getMetaTags('some_tag', array('some_param'));
39
40
        $this->assertInternalType('array', $result);
41
        $this->assertInstanceOf(Item::class, $result[0]);
42
        $this->assertEquals('some_tag', $result[0]->getTagName());
43
        $this->assertEquals('some_param', $result[0]->getTagValue());
44
    }
45
}
46