Passed
Pull Request — master (#464)
by Kirill
12:51
created

OptionsTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPipeline() 0 6 1
A testDelay() 0 6 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Jobs\Tests;
13
14
use PHPUnit\Framework\TestCase;
15
use Spiral\Jobs\Options;
16
17
class OptionsTest extends TestCase
18
{
19
    public function testDelay(): void
20
    {
21
        $o = new Options();
22
        $this->assertNull($o->getDelay());
23
        $o = $o->withDelay(10);
24
        $this->assertSame(10, $o->getDelay());
25
    }
26
27
    public function testPipeline(): void
28
    {
29
        $o = new Options();
30
        $this->assertNull($o->getPipeline());
31
        $o = $o->withPipeline('custom');
32
        $this->assertSame('custom', $o->getPipeline());
33
    }
34
}
35