@@ -72,88 +72,101 @@ public function validateConfigurationOnValid()
72
72
]
73
73
];
74
74
75
- $ this ->assertTrue ($ this ->validateConfiguration ($ args ));
75
+ $ this ->assertNull ($ this ->validateConfiguration ($ args ));
76
76
}
77
77
78
+ /**
79
+ * @see ScriptHandler::validateConfiguration
80
+ *
81
+ * @param $args
82
+ *
83
+ * @return bool
84
+ */
78
85
private function validateConfiguration ($ args )
79
86
{
80
87
return $ this ->invokeMethod (new ScriptHandler (), 'validateConfiguration ' , [$ args ]);
81
88
}
82
89
/*** *************************** OPTIONS VALIDATION *************************** ***/
83
90
/**
84
- * @see ScriptHandler::validateOptions
91
+ * @see ScriptHandler::validateMandatoryOptions
85
92
* @test
86
93
*
87
94
* @expectedException \InvalidArgumentException
88
95
*/
89
96
public function validateOptionsExpectedExceptionOnMissingInput ()
90
97
{
91
- $ this ->validateOptions ([[ScriptHandler::OPTION_KEY_OUTPUT => 'output ' ]]);
98
+ $ this ->validateMandatoryOptions ([[ScriptHandler::OPTION_KEY_OUTPUT => 'output ' ]]);
92
99
}
93
100
94
101
/**
95
- * @see ScriptHandler::validateOptions
102
+ * @see ScriptHandler::validateMandatoryOptions
96
103
* @test
97
104
*
98
105
* @expectedException \InvalidArgumentException
99
106
*/
100
107
public function validateOptionsExpectedExceptionOnMissingOutput ()
101
108
{
102
- $ this ->validateOptions ([ScriptHandler::OPTION_KEY_INPUT => 'input ' ]);
109
+ $ this ->validateMandatoryOptions ([ScriptHandler::OPTION_KEY_INPUT => 'input ' ]);
103
110
}
104
111
105
112
/**
106
- * @see ScriptHandler::validateOptions
113
+ * @see ScriptHandler::validateMandatoryOptions
107
114
* @test
108
115
*
109
116
* @expectedException \InvalidArgumentException
110
117
*/
111
118
public function validateOptionsExpectedExceptionOnInputNotArray ()
112
119
{
113
- $ this ->validateOptions ([
120
+ $ this ->validateMandatoryOptions ([
114
121
ScriptHandler::OPTION_KEY_INPUT => 'string ' ,
115
122
ScriptHandler::OPTION_KEY_OUTPUT => 'string '
116
123
]);
117
124
}
118
125
119
126
/**
120
- * @see ScriptHandler::validateOptions
127
+ * @see ScriptHandler::validateMandatoryOptions
121
128
* @test
122
129
*
123
130
* @expectedException \InvalidArgumentException
124
131
*/
125
132
public function validateOptionsExpectedExceptionOnOutputNotString ()
126
133
{
127
- $ this ->validateOptions ([
134
+ $ this ->validateMandatoryOptions ([
128
135
ScriptHandler::OPTION_KEY_INPUT => ['string ' ],
129
136
ScriptHandler::OPTION_KEY_OUTPUT => ['string ' ]
130
137
]);
131
138
}
132
139
133
140
/**
134
- * @see ScriptHandler::validateOptions
141
+ * @see ScriptHandler::validateMandatoryOptions
135
142
* @test
143
+ *
144
+ * @group tester
136
145
*/
137
146
public function validateOptionsOnValid ()
138
147
{
139
- $ this ->assertTrue (
140
- $ this ->validateOptions ([
141
- ScriptHandler::OPTION_KEY_INPUT => ['string ' ],
142
- ScriptHandler::OPTION_KEY_OUTPUT => 'string '
143
- ])
148
+ $ this ->assertNull (
149
+ $ this ->validateMandatoryOptions (
150
+ [
151
+ ScriptHandler::OPTION_KEY_INPUT => ['string ' ],
152
+ ScriptHandler::OPTION_KEY_OUTPUT => 'string '
153
+ ]
154
+ )
144
155
);
145
156
}
146
157
147
158
/**
159
+ * @see ScriptHandler::validateMandatoryOptions
160
+ *
148
161
* @param array $config
149
162
*
150
163
* @return bool
151
164
*/
152
- private function validateOptions ($ config )
165
+ private function validateMandatoryOptions ($ config )
153
166
{
154
- return $ this ->invokeMethod (new ScriptHandler (), 'validateOptions ' , [[ $ config] ]);
167
+ return $ this ->invokeMethod (new ScriptHandler (), 'validateMandatoryOptions ' , [$ config ]);
155
168
}
156
-
169
+
157
170
/*** *************************** INTEGRATION *************************** ***/
158
171
/**
159
172
* @see ScriptHandler::generateCSS
0 commit comments