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

OptionsTest::testPipeline()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
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