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 — 3.x ( 48a2e9...c23789 )
by Jindřich
20s queued 11s
created

RequestPostEventTest::testDeserialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 25
rs 9.52
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace Skaut\Skautis\Test\Unit\Wsdl\Event;
7
8
9
use PHPUnit\Framework\TestCase;
10
use Skaut\Skautis\Wsdl\Event\RequestPostEvent;
11
12
class RequestPostEventTest extends TestCase
13
{
14
15
    public function testDeserialize(): void
16
    {
17
        $args = [
18
          [
19
            'argument' => 'value',
20
          ],
21
        ];
22
        $result = [(object)['a' => 'b']];
23
        $duration = 11.11;
24
25
        $event = new RequestPostEvent('asd', $args, $result, $duration);
26
27
        $serialized = serialize($event);
28
        /** @var RequestPostEvent $unserialized */
29
        $unserialized = unserialize($serialized);
30
31
        $this->assertSame('asd', $unserialized->getFname());
32
        $this->assertArrayHasKey(0, $unserialized->getArgs());
33
        $this->assertArrayHasKey('argument', $unserialized->getArgs()[0]);
34
        $this->assertArrayHasKey(0, $unserialized->getResult());
35
        $this->assertObjectHasAttribute('a', $unserialized->getResult()[0]);
36
        $this->assertSame('b', $unserialized->getResult()[0]->a);
37
        $this->assertSame('value', $unserialized->getArgs()[0]['argument']);
38
        $this->assertSame(11.11, $unserialized->getDuration());
39
    }
40
}
41