Make sure {@link acceptValue()} is checked first!
public validate ( eZ\Publish\API\Repository\Values\User\Limitation $limitationValue ) : eZ\Publish\SPI\FieldType\ValidationError[] | ||
$limitationValue | eZ\Publish\API\Repository\Values\User\Limitation | |
Результат | eZ\Publish\SPI\FieldType\ValidationError[] |
/** * @dataProvider providerForTestValidateError * @depends testConstruct * * @param \eZ\Publish\API\Repository\Values\User\Limitation\StatusLimitation $limitation * @param int $errorCount * @param \eZ\Publish\Core\Limitation\StatusLimitationType $limitationType */ public function testValidateError(StatusLimitation $limitation, $errorCount, StatusLimitationType $limitationType) { $validationErrors = $limitationType->validate($limitation); self::assertCount($errorCount, $validationErrors); }