localeMock, $this->loggerMock, $this->attributeMetadataMock, $this->localeResolverMock, $value, 0, false, $this->stringHelper ); } /** * @param string|int|bool|null $value to assign to boolean * @param string|bool|null $expected text output * @dataProvider validateValueRequiredDataProvider */ public function testValidateValueRequired($value, $expected) { $this->attributeMetadataMock->expects($this->any())->method('getMultilineCount')->will($this->returnValue(5)); parent::testValidateValueRequired($value, $expected); } public function validateValueRequiredDataProvider() { return array_merge( parent::validateValueRequiredDataProvider(), [ 'lines' => [['one', 'two'], true], 'mixed lines' => [['one', '', ''], true], 'empty lines' => [['', '', ''], true] ] ); } /** * @param string|int|bool|null $value to assign to boolean * @param string|bool $expected text output * @dataProvider validateValueLengthDataProvider */ public function testValidateValueLength($value, $expected) { $this->attributeMetadataMock->expects($this->any())->method('getMultilineCount')->will($this->returnValue(5)); parent::testValidateValueLength($value, $expected); } public function validateValueLengthDataProvider() { return array_merge( parent::validateValueLengthDataProvider(), [ 'long lines' => [ ['0123456789', '0123456789'], '"" length must be equal or less than 8 characters.', ], 'long and short' => [ ['0123456789', '01'], '"" length must be equal or less than 8 characters.', ], 'short and long' => [ ['01', '0123456789'], '"" length must be equal or greater than 4 characters.', ] ] ); } }