Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Sep 22, 2022
1 parent 3524a95 commit ab459ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions eZ/Publish/Core/FieldType/Tests/CheckboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,25 @@ public function provideDataForGetName(): array
[new CheckboxValue(false), '0', [], 'en_GB'],
];
}

/**
* @dataProvider provideForValueIsNeverEmpty
*/
public function testValueIsNeverEmpty(CheckboxValue $value)
{
$fieldType = $this->getFieldTypeUnderTest();

self::assertFalse($fieldType->isEmptyValue($value));
}

/**
* @return iterable<array{
* \eZ\Publish\Core\FieldType\Checkbox\Value,
* }>
*/
public function provideForValueIsNeverEmpty(): iterable
{
yield [new CheckboxValue(true)];
yield [new CheckboxValue(false)];
}
}

0 comments on commit ab459ce

Please sign in to comment.