Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit a078259

Browse files
AndrolGenhaldXerkus
authored andcommitted
Added NotEmpty setType test to improve coverage
1 parent 9ee1159 commit a078259

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

test/NotEmptyTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,14 +754,30 @@ public function duplicateStringSettingProvider()
754754
*
755755
* @dataProvider singleStringNotationProvider
756756
*/
757-
public function testSingleStringNotation($value, $valid)
757+
public function testSingleStringConstructorNotation($value, $valid)
758758
{
759759
$this->validator = new NotEmpty(
760760
'boolean'
761761
);
762762
$this->checkValidationValue($value, $valid);
763763
}
764764

765+
/**
766+
* Ensures that the validator follows expected behavior
767+
*
768+
* @param mixed $value Value to test
769+
* @param boolean $valid Expected validity of value
770+
*
771+
* @return void
772+
*
773+
* @dataProvider singleStringNotationProvider
774+
*/
775+
public function testSingleStringSetTypeNotation($value, $valid)
776+
{
777+
$this->validator->setType('boolean');
778+
$this->checkValidationValue($value, $valid);
779+
}
780+
765781
/**
766782
* Provides values and their expected validity for boolean empty
767783
*

0 commit comments

Comments
 (0)