Skip to content

Commit a18961c

Browse files
Merge branch '4.4' into 5.0
* 4.4: [appveyor] bump cache [Twig][Mime] Removed extra quotes in missing package exception message [DI] µfix Allowing empty secrets to be set [DI] add missing property declarations in InlineServiceConfigurator [DI] fix detecting short service syntax in yaml Supress error from fread when reading a unix pipe [HttpClient] Fix scoped client without query option configuration [Workflow] Use a strict comparison when retrieving raw marking in MarkingStore [Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
2 parents 4996037 + 86c6380 commit a18961c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

MarkingStore/MethodMarkingStore.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getMarking(object $subject): Marking
5656

5757
$marking = $subject->{$method}();
5858

59-
if (!$marking) {
59+
if (null === $marking) {
6060
return new Marking();
6161
}
6262

Tests/MarkingStore/MethodMarkingStoreTest.php

+12
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ public function testGetSetMarkingWithSingleState()
5353
$this->assertEquals($marking, $marking2);
5454
}
5555

56+
public function testGetSetMarkingWithSingleStateAndAlmostEmptyPlaceName()
57+
{
58+
$subject = new Subject(0);
59+
60+
$markingStore = new MethodMarkingStore(true);
61+
62+
$marking = $markingStore->getMarking($subject);
63+
64+
$this->assertInstanceOf(Marking::class, $marking);
65+
$this->assertCount(1, $marking->getPlaces());
66+
}
67+
5668
public function testGetMarkingWithValueObject()
5769
{
5870
$subject = new Subject($this->createValueObject('first_place'));

0 commit comments

Comments
 (0)