Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workflow] Use a strict comparison when retrieving raw marking in MarkingStore #36375

Merged
merged 1 commit into from Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -44,7 +44,7 @@ public function getMarking($subject)
{
$placeName = $this->propertyAccessor->getValue($subject, $this->property);

if (!$placeName) {
if (null === $placeName) {
return new Marking();
}

Expand Down
Expand Up @@ -30,4 +30,17 @@ public function testGetSetMarking()

$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());
}
}