This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ public function setUp()
25
25
$ this ->input = new ArrayInput ('foo ' );
26
26
}
27
27
28
+ public function testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue ($ value = '' )
29
+ {
30
+ parent ::testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue ([$ value ]);
31
+ }
32
+
28
33
public function testValueIsNullByDefault ()
29
34
{
30
35
$ this ->markTestSkipped ('Test is not enabled in ArrayInputTest ' );
Original file line number Diff line number Diff line change @@ -91,13 +91,13 @@ public function testAllowEmptyFlagIsMutable()
91
91
92
92
public function testContinueIfEmptyFlagIsFalseByDefault ()
93
93
{
94
- $ input = new Input ( ' foo ' ) ;
94
+ $ input = $ this -> input ;
95
95
$ this ->assertFalse ($ input ->continueIfEmpty ());
96
96
}
97
97
98
98
public function testContinueIfEmptyFlagIsMutable ()
99
99
{
100
- $ input = new Input ( ' foo ' ) ;
100
+ $ input = $ this -> input ;
101
101
$ input ->setContinueIfEmpty (true );
102
102
$ this ->assertTrue ($ input ->continueIfEmpty ());
103
103
}
@@ -194,11 +194,11 @@ public function testNotRequiredWithoutFallbackAndValueNotSetThenIsValid()
194
194
$ this ->assertEquals ([], $ input ->getMessages (), 'getMessages() should be empty because the input is valid ' );
195
195
}
196
196
197
- public function testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue ()
197
+ public function testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue ($ value = '' )
198
198
{
199
- $ input = new Input ( ' foo ' ) ;
199
+ $ input = $ this -> input ;
200
200
$ input ->setContinueIfEmpty (true );
201
- $ input ->setValue ('' );
201
+ $ input ->setValue ($ value );
202
202
$ input ->isValid ();
203
203
$ validators = $ input ->getValidatorChain ()
204
204
->getValidators ();
You can’t perform that action at this time.
0 commit comments