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
Push — master ( 62839f...748982 )
by Sébastien
02:18
created

testPullRemovesItemFromCollectionAndReturnsIt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
nc 1
nop 0
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Novactive Collection.
4
 *
5
 * @author    Luke Visinoni <[email protected], [email protected]>
6
 * @author    Sébastien Morel <[email protected], [email protected]>
7
 * @copyright 2017 Novactive
8
 * @license   MIT
9
 */
10
11
namespace Novactive\Tests;
12
13
use Novactive\Collection\Factory;
14
15
/**
16
 * Class PullCollectionTest.
17
 */
18
class PullCollectionTest extends UnitTestCase
19
{
20
    public function testPullRemovesItemFromCollectionAndReturnsIt()
21
    {
22
        $coll = Factory::create($this->fixtures['assoc']);
23
        $this->assertCount(3, $coll);
24
        $this->assertTrue($coll->containsKey('2nd'));
25
        $this->assertSame(
26
            'second',
27
            $pulled = $coll->pull('2nd'),
28
            'Collection::pull() should return an item by key and return it.'
29
        );
30
        $this->assertFalse($coll->containsKey('2nd'));
31
        $this->assertCount(2, $coll);
32
        $this->assertNull($coll->pull('2nd'), 'Collection::pull() should return null if key does not exist.');
33
    }
34
}
35