-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRunCommandProcessorTest.php
41 lines (30 loc) · 1.05 KB
/
RunCommandProcessorTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Enqueue\AsyncCommand\Tests;
use Enqueue\AsyncCommand\RunCommandProcessor;
use Enqueue\Test\ReadAttributeTrait;
use Interop\Queue\Processor;
use PHPUnit\Framework\TestCase;
class RunCommandProcessorTest extends TestCase
{
use ReadAttributeTrait;
public function testShouldImplementProcessorInterface()
{
$rc = new \ReflectionClass(RunCommandProcessor::class);
$this->assertTrue($rc->implementsInterface(Processor::class));
}
public function testShouldBeFinal()
{
$rc = new \ReflectionClass(RunCommandProcessor::class);
$this->assertTrue($rc->isFinal());
}
public function testCouldBeConstructedWithProjectDirAsFirstArgument()
{
$processor = new RunCommandProcessor('aProjectDir');
$this->assertAttributeSame('aProjectDir', 'projectDir', $processor);
}
public function testCouldBeConstructedWithTimeoutAsSecondArgument()
{
$processor = new RunCommandProcessor('aProjectDir', 60);
$this->assertAttributeSame(60, 'timeout', $processor);
}
}