[Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
This commit is contained in:
parent
547c99eae5
commit
aebe8ae163
@ -44,7 +44,7 @@ class SingleStateMarkingStore implements MarkingStoreInterface
|
||||
{
|
||||
$placeName = $this->propertyAccessor->getValue($subject, $this->property);
|
||||
|
||||
if (!$placeName) {
|
||||
if (null === $placeName) {
|
||||
return new Marking();
|
||||
}
|
||||
|
||||
|
@ -30,4 +30,17 @@ class SingleStateMarkingStoreTest extends TestCase
|
||||
|
||||
$this->assertEquals($marking, $marking2);
|
||||
}
|
||||
|
||||
public function testAlmostEmptyPlaceName()
|
||||
{
|
||||
$subject = new \stdClass();
|
||||
$subject->myMarks = 0;
|
||||
|
||||
$markingStore = new SingleStateMarkingStore('myMarks');
|
||||
|
||||
$marking = $markingStore->getMarking($subject);
|
||||
|
||||
$this->assertInstanceOf(Marking::class, $marking);
|
||||
$this->assertCount(1, $marking->getPlaces());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user