Code Duplication    Length = 14-16 lines in 2 locations

tests/src/ValidatorTest.php 2 locations

@@ 179-194 (lines=16) @@
176
	 * @expectedException \HelePartnerSyncApi\ValidatorException
177
	 * @expectedExceptionMessage Invalid type in key '2': Array expected, string (what?) given.
178
	 */
179
	public function testCheckInvalidStructureNonArrayElement()
180
	{
181
		Validator::checkStructure(array(
182
			array(
183
				'moo' => 1,
184
			),
185
			array(
186
				'moo' => 2,
187
			),
188
			'what?'
189
		), array(
190
			array(
191
				'moo' => Validator::TYPE_INT,
192
			)
193
		));
194
	}
195
196
	/**
197
	 * @expectedException \HelePartnerSyncApi\ValidatorException
@@ 200-213 (lines=14) @@
197
	 * @expectedException \HelePartnerSyncApi\ValidatorException
198
	 * @expectedExceptionMessage Invalid type in path 'foo.bar': Int expected, string (moo) given.
199
	 */
200
	public function testCheckInvalidStructuresDeep()
201
	{
202
		Validator::checkStructure(array(
203
			'boo' => null,
204
			'foo' => array(
205
				'bar' => 'moo',
206
			),
207
		), array(
208
			'boo' => Validator::TYPE_NULL,
209
			'foo' => array(
210
				'bar' => Validator::TYPE_INT,
211
			),
212
		));
213
	}
214
215
	/**
216
	 * @expectedException \HelePartnerSyncApi\ValidatorException