[Workflow] Use a strict comparison when retrieving raw marking in MarkingStore
This commit is contained in:
parent
f72dd9cafa
commit
a00a2f1115
@ -56,7 +56,7 @@ final class MethodMarkingStore implements MarkingStoreInterface
|
|||||||
|
|
||||||
$marking = $subject->{$method}();
|
$marking = $subject->{$method}();
|
||||||
|
|
||||||
if (!$marking) {
|
if (null === $marking) {
|
||||||
return new Marking();
|
return new Marking();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,18 @@ class MethodMarkingStoreTest extends TestCase
|
|||||||
$this->assertEquals($marking, $marking2);
|
$this->assertEquals($marking, $marking2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetSetMarkingWithSingleStateAndAlmostEmptyPlaceName()
|
||||||
|
{
|
||||||
|
$subject = new Subject(0);
|
||||||
|
|
||||||
|
$markingStore = new MethodMarkingStore(true);
|
||||||
|
|
||||||
|
$marking = $markingStore->getMarking($subject);
|
||||||
|
|
||||||
|
$this->assertInstanceOf(Marking::class, $marking);
|
||||||
|
$this->assertCount(1, $marking->getPlaces());
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetMarkingWithValueObject()
|
public function testGetMarkingWithValueObject()
|
||||||
{
|
{
|
||||||
$subject = new Subject($this->createValueObject('first_place'));
|
$subject = new Subject($this->createValueObject('first_place'));
|
||||||
|
Reference in New Issue
Block a user