Total Complexity | 64 |
Total Lines | 654 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
Complex classes like StandardTest often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use StandardTest, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
13 | class StandardTest extends \PHPUnit\Framework\TestCase |
||
14 | { |
||
15 | private $object; |
||
16 | private $values; |
||
17 | |||
18 | |||
19 | protected function setUp() : void |
||
20 | { |
||
21 | $this->values = array( |
||
22 | 'product.id' => 1, |
||
23 | 'product.siteid' => '1.33.99.', |
||
24 | 'product.type' => 'test', |
||
25 | 'product.status' => 1, |
||
26 | 'product.code' => 'TEST', |
||
27 | 'product.dataset' => 'Shirts', |
||
28 | 'product.url' => 'test_product', |
||
29 | 'product.label' => 'testproduct', |
||
30 | 'product.config' => array( 'css-class' => 'test' ), |
||
31 | 'product.datestart' => null, |
||
32 | 'product.dateend' => null, |
||
33 | 'product.scale' => '', |
||
34 | 'product.ctime' => '2011-01-19 17:04:32', |
||
35 | 'product.mtime' => '2011-01-19 18:04:32', |
||
36 | 'product.editor' => 'unitTestUser', |
||
37 | 'product.target' => 'testtarget', |
||
38 | 'product.rating' => '4.80', |
||
39 | 'product.ratings' => 5, |
||
40 | 'product.instock' => 1, |
||
41 | 'additional' => 'value', |
||
42 | ); |
||
43 | |||
44 | $propItems = array( |
||
45 | 2 => new \Aimeos\MShop\Common\Item\Property\Standard( 'product.property.', array( |
||
46 | 'product.property.id' => 2, |
||
47 | 'product.property.parentid' => 1, |
||
48 | 'product.property.type' => 'proptest', |
||
49 | 'product.property.languageid' => 'de', |
||
50 | '.languageid' => 'de', |
||
51 | ) ), |
||
52 | 3 => new \Aimeos\MShop\Common\Item\Property\Standard( 'product.property.', array( |
||
53 | 'product.property.id' => 3, |
||
54 | 'product.property.parentid' => 1, |
||
55 | 'product.property.type' => 'proptype', |
||
56 | 'product.property.languageid' => 'de', |
||
57 | '.languageid' => 'fr', |
||
58 | ) ), |
||
59 | ); |
||
60 | |||
61 | $this->object = new \Aimeos\MShop\Product\Item\Standard( $this->values, [], [], $propItems ); |
||
62 | } |
||
63 | |||
64 | |||
65 | protected function tearDown() : void |
||
66 | { |
||
67 | unset( $this->object, $this->values ); |
||
68 | } |
||
69 | |||
70 | |||
71 | public function testDynamicMethods() |
||
72 | { |
||
73 | \Aimeos\MShop\Product\Item\Standard::macro( 'test', function( $name ) { |
||
74 | return $this->bdata[$name]; |
||
|
|||
75 | } ); |
||
76 | |||
77 | $this->assertInstanceOf( '\Closure', \Aimeos\MShop\Product\Item\Standard::macro( 'test' ) ); |
||
78 | |||
79 | $object = new \Aimeos\MShop\Product\Item\Standard( $this->values ); |
||
80 | $this->assertEquals( 'TEST', $object->test( 'product.code' ) ); |
||
81 | |||
82 | $this->expectException( \BadMethodCallException::class ); |
||
83 | $object->invalid(); |
||
84 | } |
||
85 | |||
86 | |||
87 | public function testDynamicBaseMethods() |
||
88 | { |
||
89 | \Aimeos\MShop\Common\Item\Base::macro( 'tests', function( $name ) { |
||
90 | return $this->bdata[$name]; |
||
91 | } ); |
||
92 | |||
93 | $this->assertInstanceOf( '\Closure', \Aimeos\MShop\Product\Item\Standard::macro( 'tests' ) ); |
||
94 | |||
95 | $object = new \Aimeos\MShop\Product\Item\Standard( $this->values ); |
||
96 | $this->assertEquals( 'TEST', $object->tests( 'product.code' ) ); |
||
97 | |||
98 | $this->expectException( \BadMethodCallException::class ); |
||
99 | $object->invalid(); |
||
100 | } |
||
101 | |||
102 | |||
103 | public function testArrayMethods() |
||
104 | { |
||
105 | $this->assertFalse( isset( $this->object['test'] ) ); |
||
106 | $this->assertEquals( null, $this->object['test'] ); |
||
107 | |||
108 | $this->object['test'] = 'value'; |
||
109 | |||
110 | $this->assertTrue( isset( $this->object['test'] ) ); |
||
111 | $this->assertEquals( 'value', $this->object['test'] ); |
||
112 | |||
113 | $this->expectException( \LogicException::class ); |
||
114 | unset( $this->object['test'] ); |
||
115 | } |
||
116 | |||
117 | |||
118 | public function testMagicMethods() |
||
119 | { |
||
120 | $this->assertFalse( isset( $this->object->test ) ); |
||
121 | $this->assertEquals( null, $this->object->test ); |
||
122 | |||
123 | $this->object->test = 'value'; |
||
124 | |||
125 | $this->assertTrue( isset( $this->object->test ) ); |
||
126 | $this->assertEquals( 'value', $this->object->test ); |
||
127 | |||
128 | $this->assertEquals( '1', (string) $this->object ); |
||
129 | } |
||
130 | |||
131 | |||
132 | public function testGetSet() |
||
140 | } |
||
141 | |||
142 | |||
143 | public function testJsonSerialize() |
||
144 | { |
||
145 | $result = json_decode( json_encode( $this->object ), true ); |
||
146 | |||
147 | $this->assertEquals( 1, $result['product.id'] ); |
||
148 | $this->assertEquals( '1.33.99.', $result['product.siteid'] ); |
||
149 | |||
150 | |||
151 | $result = json_decode( json_encode( [1 => $this->object] ), true ); |
||
152 | |||
153 | $this->assertEquals( 1, $result[1]['product.id'] ); |
||
154 | $this->assertEquals( '1.33.99.', $result[1]['product.siteid'] ); |
||
155 | } |
||
156 | |||
157 | |||
158 | public function testAssign() |
||
159 | { |
||
160 | $this->assertEquals( false, $this->object->get( 'test', false ) ); |
||
161 | |||
162 | $return = $this->object->assign( ['test' => 'value'] ); |
||
163 | |||
164 | $this->assertEquals( 'value', $this->object->get( 'test', false ) ); |
||
165 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
166 | } |
||
167 | |||
168 | |||
169 | public function testGetId() |
||
170 | { |
||
171 | $this->assertEquals( '1', $this->object->getId() ); |
||
172 | } |
||
173 | |||
174 | |||
175 | public function testSetId() |
||
176 | { |
||
177 | $return = $this->object->setId( null ); |
||
178 | |||
179 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
180 | $this->assertNull( $this->object->getId() ); |
||
181 | $this->assertTrue( $this->object->isModified() ); |
||
182 | |||
183 | $return = $this->object->setId( 1 ); |
||
184 | |||
185 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
186 | $this->assertEquals( '1', $this->object->getId() ); |
||
187 | $this->assertFalse( $this->object->isModified() ); |
||
188 | } |
||
189 | |||
190 | |||
191 | public function testGetSiteId() |
||
192 | { |
||
193 | $this->assertEquals( '1.33.99.', $this->object->getSiteId() ); |
||
194 | } |
||
195 | |||
196 | |||
197 | public function testGetSitePath() |
||
198 | { |
||
199 | $this->assertEquals( ['1.', '1.33.', '1.33.99.'], $this->object->getSitePath() ); |
||
200 | } |
||
201 | |||
202 | |||
203 | public function testGetType() |
||
204 | { |
||
205 | $this->assertEquals( 'test', $this->object->getType() ); |
||
206 | } |
||
207 | |||
208 | |||
209 | public function testSetType() |
||
210 | { |
||
211 | $this->assertFalse( $this->object->isModified() ); |
||
212 | |||
213 | $return = $this->object->setType( 'default' ); |
||
214 | |||
215 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
216 | $this->assertEquals( 'default', $this->object->getType() ); |
||
217 | $this->assertTrue( $this->object->isModified() ); |
||
218 | } |
||
219 | |||
220 | |||
221 | public function testGetCode() |
||
222 | { |
||
223 | $this->assertEquals( 'TEST', $this->object->getCode() ); |
||
224 | } |
||
225 | |||
226 | |||
227 | public function testSetCode() |
||
228 | { |
||
229 | $this->assertFalse( $this->object->isModified() ); |
||
230 | |||
231 | $return = $this->object->setCode( 'NEU' ); |
||
232 | |||
233 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
234 | $this->assertEquals( 'NEU', $this->object->getCode() ); |
||
235 | $this->assertTrue( $this->object->isModified() ); |
||
236 | } |
||
237 | |||
238 | |||
239 | public function testGetDataset() |
||
240 | { |
||
241 | $this->assertEquals( 'Shirts', $this->object->getDataset() ); |
||
242 | } |
||
243 | |||
244 | |||
245 | public function testSetDataset() |
||
246 | { |
||
247 | $this->assertFalse( $this->object->isModified() ); |
||
248 | |||
249 | $return = $this->object->setDataset( 'Skirts' ); |
||
250 | |||
251 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
252 | $this->assertEquals( 'Skirts', $this->object->getDataset() ); |
||
253 | $this->assertTrue( $this->object->isModified() ); |
||
254 | } |
||
255 | |||
256 | |||
257 | public function testGetScale() |
||
258 | { |
||
259 | $this->assertEquals( 1, $this->object->getScale() ); |
||
260 | } |
||
261 | |||
262 | |||
263 | public function testSetScale() |
||
270 | } |
||
271 | |||
272 | |||
273 | public function testSetScaleInvalid() |
||
274 | { |
||
275 | $return = $this->object->setScale( -1 ); |
||
276 | |||
277 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
278 | $this->assertEquals( 1, $this->object->getScale() ); |
||
279 | $this->assertTrue( $this->object->isModified() ); |
||
280 | } |
||
281 | |||
282 | |||
283 | public function testGetEditor() |
||
284 | { |
||
285 | $this->assertEquals( 'unitTestUser', $this->object->editor() ); |
||
286 | } |
||
287 | |||
288 | |||
289 | public function testGetStatus() |
||
290 | { |
||
291 | $this->assertEquals( 1, $this->object->getStatus() ); |
||
292 | } |
||
293 | |||
294 | |||
295 | public function testSetStatus() |
||
302 | } |
||
303 | |||
304 | |||
305 | public function testGetLabel() |
||
306 | { |
||
307 | $this->assertEquals( 'testproduct', $this->object->getLabel() ); |
||
308 | } |
||
309 | |||
310 | |||
311 | public function testSetLabel() |
||
312 | { |
||
313 | $return = $this->object->setLabel( 'editproduct' ); |
||
314 | |||
315 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
316 | $this->assertEquals( 'editproduct', $this->object->getLabel() ); |
||
317 | $this->assertTrue( $this->object->isModified() ); |
||
318 | } |
||
319 | |||
320 | |||
321 | public function testGetUrl() |
||
322 | { |
||
323 | $this->assertEquals( 'test_product', $this->object->getUrl() ); |
||
324 | } |
||
325 | |||
326 | |||
327 | public function testSetUrl() |
||
328 | { |
||
329 | $return = $this->object->setUrl( 'edit_product' ); |
||
330 | |||
331 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
332 | $this->assertEquals( 'edit_product', $this->object->getUrl() ); |
||
333 | $this->assertTrue( $this->object->isModified() ); |
||
334 | } |
||
335 | |||
336 | |||
337 | public function testGetConfig() |
||
338 | { |
||
339 | $this->assertEquals( array( 'css-class' => 'test' ), $this->object->getConfig() ); |
||
340 | } |
||
341 | |||
342 | |||
343 | public function testGetConfigValue() |
||
344 | { |
||
345 | $this->assertEquals( 'test', $this->object->getConfigValue( 'css-class' ) ); |
||
346 | } |
||
347 | |||
348 | |||
349 | public function testSetConfig() |
||
350 | { |
||
351 | $this->assertFalse( $this->object->isModified() ); |
||
352 | |||
353 | $return = $this->object->setConfig( array( 'key' => 'value' ) ); |
||
354 | |||
355 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
356 | $this->assertEquals( array( 'key' => 'value' ), $this->object->getConfig() ); |
||
357 | $this->assertTrue( $this->object->isModified() ); |
||
358 | } |
||
359 | |||
360 | |||
361 | public function testSetConfigValue() |
||
362 | { |
||
363 | $result = $this->object->setConfigValue( 'path/to/value', 'test' ); |
||
364 | $expected = ['path' => ['to' => ['value' => 'test']], 'css-class' => 'test']; |
||
365 | |||
366 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $result ); |
||
367 | $this->assertEquals( $expected, $this->object->getConfig() ); |
||
368 | |||
369 | $result = $this->object->setConfigValue( 'path/to/value2', 'test2' ); |
||
370 | $expected = ['path' => ['to' => ['value' => 'test', 'value2' => 'test2']], 'css-class' => 'test']; |
||
371 | |||
372 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $result ); |
||
373 | $this->assertEquals( $expected, $this->object->getConfig() ); |
||
374 | } |
||
375 | |||
376 | |||
377 | public function testGetTarget() |
||
378 | { |
||
379 | $this->assertEquals( 'testtarget', $this->object->getTarget() ); |
||
380 | } |
||
381 | |||
382 | |||
383 | public function testSetTarget() |
||
384 | { |
||
385 | $this->assertFalse( $this->object->isModified() ); |
||
386 | |||
387 | $return = $this->object->setTarget( 'ttarget' ); |
||
388 | |||
389 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
390 | $this->assertEquals( 'ttarget', $this->object->getTarget() ); |
||
391 | $this->assertTrue( $this->object->isModified() ); |
||
392 | } |
||
393 | |||
394 | |||
395 | public function testGetDateStart() |
||
396 | { |
||
397 | $this->assertEquals( null, $this->object->getDateStart() ); |
||
398 | } |
||
399 | |||
400 | |||
401 | public function testSetDateStart() |
||
402 | { |
||
403 | $return = $this->object->setDateStart( '2010-04-22 06:22:22' ); |
||
404 | |||
405 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
406 | $this->assertEquals( '2010-04-22 06:22:22', $this->object->getDateStart() ); |
||
407 | $this->assertTrue( $this->object->isModified() ); |
||
408 | } |
||
409 | |||
410 | |||
411 | public function testGetDateEnd() |
||
412 | { |
||
413 | $this->assertEquals( null, $this->object->getDateEnd() ); |
||
414 | } |
||
415 | |||
416 | |||
417 | public function testSetDateEnd() |
||
418 | { |
||
419 | $return = $this->object->setDateEnd( '2010-05-22 06:22' ); |
||
420 | |||
421 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
422 | $this->assertEquals( '2010-05-22 06:22:00', $this->object->getDateEnd() ); |
||
423 | $this->assertTrue( $this->object->isModified() ); |
||
424 | } |
||
425 | |||
426 | |||
427 | public function testGetTimeModified() |
||
428 | { |
||
429 | $this->assertEquals( '2011-01-19 18:04:32', $this->object->getTimeModified() ); |
||
430 | } |
||
431 | |||
432 | |||
433 | public function testGetTimeCreated() |
||
434 | { |
||
435 | $this->assertEquals( '2011-01-19 17:04:32', $this->object->getTimeCreated() ); |
||
436 | } |
||
437 | |||
438 | |||
439 | public function testSetTimeCreated() |
||
440 | { |
||
441 | $return = $this->object->setTimeCreated( '2010-05-22 06:22:22' ); |
||
442 | |||
443 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
444 | $this->assertEquals( '2010-05-22 06:22:22', $this->object->getTimeCreated() ); |
||
445 | $this->assertTrue( $this->object->isModified() ); |
||
446 | } |
||
447 | |||
448 | |||
449 | public function testGetRating() |
||
450 | { |
||
451 | $this->assertEquals( '4.80', $this->object->getRating() ); |
||
452 | } |
||
453 | |||
454 | |||
455 | public function testGetRatings() |
||
456 | { |
||
457 | $this->assertEquals( 5, $this->object->getRatings() ); |
||
458 | } |
||
459 | |||
460 | |||
461 | public function testInStock() |
||
462 | { |
||
463 | $this->assertEquals( 1, $this->object->inStock() ); |
||
464 | } |
||
465 | |||
466 | |||
467 | public function testSetInStock() |
||
468 | { |
||
469 | $return = $this->object->setInStock( 0 ); |
||
470 | |||
471 | $this->assertInstanceOf( \Aimeos\MShop\Product\Item\Iface::class, $return ); |
||
472 | $this->assertEquals( 0, $this->object->inStock() ); |
||
473 | $this->assertTrue( $this->object->isModified() ); |
||
474 | } |
||
475 | |||
476 | |||
477 | public function testIsAvailable() |
||
478 | { |
||
479 | $this->assertTrue( $this->object->isAvailable() ); |
||
480 | $this->object->setAvailable( false ); |
||
481 | $this->assertFalse( $this->object->isAvailable() ); |
||
482 | } |
||
483 | |||
484 | |||
485 | public function testIsAvailableOnStatus() |
||
486 | { |
||
487 | $this->assertTrue( $this->object->isAvailable() ); |
||
488 | $this->object->setStatus( 0 ); |
||
489 | $this->assertFalse( $this->object->isAvailable() ); |
||
490 | $this->object->setStatus( -1 ); |
||
491 | $this->assertFalse( $this->object->isAvailable() ); |
||
492 | } |
||
493 | |||
494 | |||
495 | public function testIsAvailableOnTime() |
||
496 | { |
||
497 | $this->assertTrue( $this->object->isAvailable() ); |
||
498 | $this->object->setDateStart( date( 'Y-m-d H:i:s', time() + 600 ) ); |
||
499 | $this->assertFalse( $this->object->isAvailable() ); |
||
500 | $this->object->setDateEnd( date( 'Y-m-d H:i:s', time() - 600 ) ); |
||
501 | $this->assertFalse( $this->object->isAvailable() ); |
||
502 | } |
||
503 | |||
504 | |||
505 | public function testIsAvailableEvent() |
||
506 | { |
||
507 | $this->object->setType( 'event' ); |
||
508 | $this->assertTrue( $this->object->isAvailable() ); |
||
509 | $this->object->setDateStart( date( 'Y-m-d H:i:s', time() + 600 ) ); |
||
510 | $this->assertTrue( $this->object->isAvailable() ); |
||
511 | $this->object->setDateEnd( date( 'Y-m-d H:i:s', time() - 600 ) ); |
||
512 | $this->assertFalse( $this->object->isAvailable() ); |
||
513 | } |
||
514 | |||
515 | |||
516 | public function testIsModified() |
||
517 | { |
||
518 | $this->assertFalse( $this->object->isModified() ); |
||
519 | } |
||
520 | |||
521 | |||
522 | public function testIsModifiedTrue() |
||
523 | { |
||
524 | $this->object->setLabel( 'reeditProduct' ); |
||
525 | $this->assertTrue( $this->object->isModified() ); |
||
526 | } |
||
527 | |||
528 | |||
529 | public function testGetResourceType() |
||
530 | { |
||
531 | $this->assertEquals( 'product', $this->object->getResourceType() ); |
||
532 | } |
||
533 | |||
534 | |||
535 | public function testGetPropertyItems() |
||
536 | { |
||
537 | $propItems = $this->object->getPropertyItems(); |
||
538 | |||
539 | $this->assertEquals( 1, count( $propItems ) ); |
||
540 | |||
541 | foreach( $propItems as $propItem ) { |
||
542 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Property\Iface::class, $propItem ); |
||
543 | } |
||
544 | } |
||
545 | |||
546 | |||
547 | public function testGetSiteItem() |
||
548 | { |
||
549 | $siteItem = \TestHelper::context()->locale()->getSiteItem(); |
||
550 | $object = new \Aimeos\MShop\Product\Item\Standard( ['.locale/site' => $siteItem] ); |
||
551 | |||
552 | $this->assertInstanceOf( \Aimeos\MShop\Locale\Item\Site\Iface::class, $object->getSiteItem() ); |
||
553 | } |
||
554 | |||
555 | |||
556 | public function testGetStockItems() |
||
562 | } |
||
563 | |||
564 | |||
565 | public function testGetStockItemsType() |
||
566 | { |
||
567 | $stock = new \Aimeos\MShop\Stock\Item\Standard(); |
||
568 | $stocks = [123 => ( clone $stock )->setType( 'something' ), 456 => ( clone $stock )->setType( 'default' )]; |
||
569 | $object = new \Aimeos\MShop\Product\Item\Standard( ['.stock' => $stocks] ); |
||
570 | |||
571 | $this->assertInstanceOf( \Aimeos\Map::class, $object->getStockItems( 'default' ) ); |
||
572 | $this->assertEquals( 'default', $object->getStockItems( 'default' )->getType()->first() ); |
||
573 | $this->assertCount( 1, $object->getStockItems( 'default' ) ); |
||
574 | } |
||
575 | |||
576 | |||
577 | public function testGetPropertyItemsAll() |
||
578 | { |
||
579 | $propItems = $this->object->getPropertyItems( null, false ); |
||
580 | |||
581 | $this->assertEquals( 2, count( $propItems ) ); |
||
582 | |||
583 | foreach( $propItems as $propItem ) { |
||
584 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Property\Iface::class, $propItem ); |
||
585 | } |
||
586 | } |
||
587 | |||
588 | |||
589 | public function testGetPropertyItemsType() |
||
590 | { |
||
591 | $propItems = $this->object->getPropertyItems( 'proptest' ); |
||
592 | |||
593 | $this->assertEquals( 1, count( $propItems ) ); |
||
594 | |||
595 | foreach( $propItems as $propItem ) { |
||
596 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Property\Iface::class, $propItem ); |
||
597 | } |
||
598 | } |
||
599 | |||
600 | |||
601 | public function testFromArray() |
||
640 | } |
||
641 | |||
642 | |||
643 | public function testToArray() |
||
644 | { |
||
645 | $arrayObject = $this->object->toArray( true ); |
||
646 | $this->assertEquals( count( $this->values ), count( $arrayObject ) ); |
||
647 | |||
648 | $this->assertEquals( $this->object->getId(), $arrayObject['product.id'] ); |
||
649 | $this->assertEquals( $this->object->getSiteId(), $arrayObject['product.siteid'] ); |
||
650 | $this->assertEquals( $this->object->getCode(), $arrayObject['product.code'] ); |
||
651 | $this->assertEquals( $this->object->getType(), $arrayObject['product.type'] ); |
||
652 | $this->assertEquals( $this->object->getDataset(), $arrayObject['product.dataset'] ); |
||
653 | $this->assertEquals( $this->object->getLabel(), $arrayObject['product.label'] ); |
||
654 | $this->assertEquals( $this->object->getUrl(), $arrayObject['product.url'] ); |
||
655 | $this->assertEquals( $this->object->getStatus(), $arrayObject['product.status'] ); |
||
656 | $this->assertEquals( $this->object->getDateStart(), $arrayObject['product.datestart'] ); |
||
657 | $this->assertEquals( $this->object->getDateEnd(), $arrayObject['product.dateend'] ); |
||
658 | $this->assertEquals( $this->object->getConfig(), $arrayObject['product.config'] ); |
||
659 | $this->assertEquals( $this->object->getTimeCreated(), $arrayObject['product.ctime'] ); |
||
660 | $this->assertEquals( $this->object->getTimeModified(), $arrayObject['product.mtime'] ); |
||
661 | $this->assertEquals( $this->object->editor(), $arrayObject['product.editor'] ); |
||
662 | $this->assertEquals( $this->object->getTarget(), $arrayObject['product.target'] ); |
||
663 | $this->assertEquals( $this->object->getScale(), $arrayObject['product.scale'] ); |
||
664 | $this->assertEquals( $this->object->getRating(), $arrayObject['product.rating'] ); |
||
665 | $this->assertEquals( $this->object->getRatings(), $arrayObject['product.ratings'] ); |
||
666 | $this->assertEquals( $this->object->inStock(), $arrayObject['product.instock'] ); |
||
667 | } |
||
668 | } |
||
669 |