Skip to content

Commit 0062979

Browse files
committed
ICM: Tests added.
1 parent ca7047f commit 0062979

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/MutexTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ public function it_has_one_required_constructor_argument_which_is_command()
1313
$mutex = new Mutex($command);
1414
$this->assertInstanceOf(Mutex::class, $mutex);
1515
}
16+
17+
/** @test */
18+
public function it_determines_mutex_strategy_once_while_creation()
19+
{
20+
$command = Mockery::mock(GenericCommand::class)->makePartial();
21+
$command->shouldReceive('argument')->withNoArgs()->once()->andReturn(['foo' => 'bar']);
22+
23+
$mutex = new Mutex($command);
24+
$this->assertSame($mutex->getStrategy(), $mutex->getStrategy());
25+
}
1626
}

0 commit comments

Comments
 (0)