| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function up() |
||
| 32 | { |
||
| 33 | $this->info( 'Adding order cart test data', 'vv' ); |
||
| 34 | |||
| 35 | $context = $this->context()->setEditor( 'core' ); |
||
|
|
|||
| 36 | |||
| 37 | $ds = DIRECTORY_SEPARATOR; |
||
| 38 | $path = __DIR__ . $ds . 'data' . $ds . 'order-cart.php'; |
||
| 39 | |||
| 40 | if( ( $testdata = include( $path ) ) == false ) { |
||
| 41 | throw new \RuntimeException( sprintf( 'No file "%1$s" found for order carts', $path ) ); |
||
| 42 | } |
||
| 43 | |||
| 44 | $manager = \Aimeos\MShop::create( $context, 'order/cart', 'Standard' ); |
||
| 45 | |||
| 46 | foreach( $testdata as $entry ) { |
||
| 47 | $manager->save( $manager->create()->fromArray( $entry, true ) )->setCustomerId( $this->getCustomer()->getId() ); |
||
| 48 | } |
||
| 58 |