bug #36376 [Workflow] Use a strict comparison when retrieving raw marking in MarkingStore (lyrixx)
This PR was merged into the 4.4 branch.
Discussion
----------
[Workflow] Use a strict comparison when retrieving raw marking in MarkingStore
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #https://github.com/symfony/symfony/issues/36358
| License | MIT
| Doc PR |
Commits
-------
a00a2f1115
[Workflow] Use a strict comparison when retrieving raw marking in MarkingStore
This commit is contained in:
commit
e129a1655d
@ -56,7 +56,7 @@ final class MethodMarkingStore implements MarkingStoreInterface
|
||||
|
||||
$marking = $subject->{$method}();
|
||||
|
||||
if (!$marking) {
|
||||
if (null === $marking) {
|
||||
return new Marking();
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,18 @@ class MethodMarkingStoreTest extends TestCase
|
||||
$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()
|
||||
{
|
||||
$subject = new Subject($this->createValueObject('first_place'));
|
||||
|
Reference in New Issue
Block a user