bug #36375 [Workflow] Use a strict comparison when retrieving raw marking in MarkingStore (lyrixx)
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] Use a strict comparison when retrieving raw marking in MarkingStore
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #36358
| License | MIT
| Doc PR |
Commits
-------
aebe8ae163
[Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
This commit is contained in:
commit
932a4f86ed
@ -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