diff options
Diffstat (limited to 'plugins/jobs/oooold/tests/Jobs/OptionsTest.php')
-rw-r--r-- | plugins/jobs/oooold/tests/Jobs/OptionsTest.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/jobs/oooold/tests/Jobs/OptionsTest.php b/plugins/jobs/oooold/tests/Jobs/OptionsTest.php new file mode 100644 index 00000000..5d00794e --- /dev/null +++ b/plugins/jobs/oooold/tests/Jobs/OptionsTest.php @@ -0,0 +1,34 @@ +<?php + +/** + * Spiral Framework. + * + * @license MIT + * @author Anton Titov (Wolfy-J) + */ + +declare(strict_types=1); + +namespace Spiral\Jobs\Tests; + +use PHPUnit\Framework\TestCase; +use Spiral\Jobs\Options; + +class OptionsTest extends TestCase +{ + public function testDelay(): void + { + $o = new Options(); + $this->assertNull($o->getDelay()); + $o = $o->withDelay(10); + $this->assertSame(10, $o->getDelay()); + } + + public function testPipeline(): void + { + $o = new Options(); + $this->assertNull($o->getPipeline()); + $o = $o->withPipeline('custom'); + $this->assertSame('custom', $o->getPipeline()); + } +} |