Completed
Push — master ( 4f68a8...3694fa )
by Anton
01:24
created

tests/Unit/Job/Entities/JobTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
use Illuminate\Support\Carbon;
19
20
final class JobTest extends TestCase
0 ignored issues
show
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: artisan, be, call, seed
Loading history...
21
{
22
    /** @test */
23
    public function it_can_instantiate_from_array(): void
24
    {
25
        $job = Job::fromArray([
26
            'type' => 'TestType',
27
            'id' => 'TestId',
28
            'status' => 'TestStatus',
29
            'process' => [],
30
            'requirement' => [
31
                'name' => 'cybercog/laravel-paket',
32
            ],
33
            'createdAt' => Carbon::now()->format(DATE_RFC3339_EXTENDED),
34
        ]);
35
36
        $this->assertInstanceOf(Job::class, $job);
37
        $this->assertSame('TestType', $job->getType());
38
    }
39
}
40