Skip to content

Commit 86c6380

Browse files
committed
Merge remote-tracking branch 'origin/3.4' into 4.4
* origin/3.4: [Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
2 parents 57cc0b5 + b46e9ae commit 86c6380

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

MarkingStore/SingleStateMarkingStore.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getMarking($subject)
4545
{
4646
$placeName = $this->propertyAccessor->getValue($subject, $this->property);
4747

48-
if (!$placeName) {
48+
if (null === $placeName) {
4949
return new Marking();
5050
}
5151

Tests/MarkingStore/SingleStateMarkingStoreTest.php

+13
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,17 @@ public function testGetSetMarking()
3131

3232
$this->assertEquals($marking, $marking2);
3333
}
34+
35+
public function testAlmostEmptyPlaceName()
36+
{
37+
$subject = new \stdClass();
38+
$subject->myMarks = 0;
39+
40+
$markingStore = new SingleStateMarkingStore('myMarks');
41+
42+
$marking = $markingStore->getMarking($subject);
43+
44+
$this->assertInstanceOf(Marking::class, $marking);
45+
$this->assertCount(1, $marking->getPlaces());
46+
}
3447
}

0 commit comments

Comments
 (0)