Completed
Pull Request — master (#2)
by Anton
01:19
created

JobTest::it_can_instantiate_from_array()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of Laravel Paket.
5
 *
6
 * (c) Anton Komarev <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cog\Tests\Laravel\Paket\Unit\Job\Entities;
15
16
use Cog\Laravel\Paket\Job\Entities\Job;
17
use Cog\Tests\Laravel\Paket\TestCase;
18
19
final class JobTest extends TestCase
20
{
21
    /** @test */
22
    public function it_can_instantiate_from_array(): void
23
    {
24
        $job = Job::fromArray([
25
            'type' => 'TestType',
26
            'id' => 'TestId',
27
            'status' => 'TestStatus',
28
            'process' => [],
29
            'requirement' => [
30
                'name' => 'cybercog/laravel-paket',
31
            ],
32
        ]);
33
34
        $this->assertInstanceOf(Job::class, $job);
35
        $this->assertSame('TestType', $job->getType());
36
    }
37
}
38