@@ -10,107 +10,107 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class StandardTest extends \PHPUnit_Framework_TestCase |
| 12 | 12 | { |
| 13 | - private static $orderItem; |
|
| 14 | - private static $orderBaseItem; |
|
| 15 | - private $object; |
|
| 16 | - private $context; |
|
| 17 | - private $emailMock; |
|
| 13 | + private static $orderItem; |
|
| 14 | + private static $orderBaseItem; |
|
| 15 | + private $object; |
|
| 16 | + private $context; |
|
| 17 | + private $emailMock; |
|
| 18 | 18 | |
| 19 | 19 | |
| 20 | - public static function setUpBeforeClass() |
|
| 21 | - { |
|
| 22 | - $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 23 | - $orderBaseManager = $orderManager->getSubManager( 'base' ); |
|
| 20 | + public static function setUpBeforeClass() |
|
| 21 | + { |
|
| 22 | + $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 23 | + $orderBaseManager = $orderManager->getSubManager( 'base' ); |
|
| 24 | 24 | |
| 25 | - $search = $orderManager->createSearch(); |
|
| 26 | - $search->setConditions( $search->compare( '==', 'order.datepayment', '2008-02-15 12:34:56' ) ); |
|
| 27 | - $result = $orderManager->searchItems( $search ); |
|
| 25 | + $search = $orderManager->createSearch(); |
|
| 26 | + $search->setConditions( $search->compare( '==', 'order.datepayment', '2008-02-15 12:34:56' ) ); |
|
| 27 | + $result = $orderManager->searchItems( $search ); |
|
| 28 | 28 | |
| 29 | - if( ( self::$orderItem = reset( $result ) ) === false ) { |
|
| 30 | - throw new \Exception( 'No order found' ); |
|
| 31 | - } |
|
| 29 | + if( ( self::$orderItem = reset( $result ) ) === false ) { |
|
| 30 | + throw new \Exception( 'No order found' ); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - self::$orderBaseItem = $orderBaseManager->load( self::$orderItem->getBaseId() ); |
|
| 34 | - } |
|
| 33 | + self::$orderBaseItem = $orderBaseManager->load( self::$orderItem->getBaseId() ); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Sets up the fixture, for example, opens a network connection. |
|
| 39 | - * This method is called before a test is executed. |
|
| 40 | - * |
|
| 41 | - * @access protected |
|
| 42 | - */ |
|
| 43 | - protected function setUp() |
|
| 44 | - { |
|
| 45 | - $this->context = \TestHelperHtml::getContext(); |
|
| 46 | - $this->emailMock = $this->getMock( '\\Aimeos\\MW\\Mail\\Message\\None' ); |
|
| 37 | + /** |
|
| 38 | + * Sets up the fixture, for example, opens a network connection. |
|
| 39 | + * This method is called before a test is executed. |
|
| 40 | + * |
|
| 41 | + * @access protected |
|
| 42 | + */ |
|
| 43 | + protected function setUp() |
|
| 44 | + { |
|
| 45 | + $this->context = \TestHelperHtml::getContext(); |
|
| 46 | + $this->emailMock = $this->getMock( '\\Aimeos\\MW\\Mail\\Message\\None' ); |
|
| 47 | 47 | |
| 48 | - $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 49 | - $this->object = new \Aimeos\Client\Html\Email\Payment\Html\Summary\Standard( $this->context, $paths ); |
|
| 48 | + $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 49 | + $this->object = new \Aimeos\Client\Html\Email\Payment\Html\Summary\Standard( $this->context, $paths ); |
|
| 50 | 50 | |
| 51 | - $view = \TestHelperHtml::getView(); |
|
| 52 | - $view->extOrderItem = self::$orderItem; |
|
| 53 | - $view->extOrderBaseItem = self::$orderBaseItem; |
|
| 54 | - $view->addHelper( 'mail', new \Aimeos\MW\View\Helper\Mail\Standard( $view, $this->emailMock ) ); |
|
| 51 | + $view = \TestHelperHtml::getView(); |
|
| 52 | + $view->extOrderItem = self::$orderItem; |
|
| 53 | + $view->extOrderBaseItem = self::$orderBaseItem; |
|
| 54 | + $view->addHelper( 'mail', new \Aimeos\MW\View\Helper\Mail\Standard( $view, $this->emailMock ) ); |
|
| 55 | 55 | |
| 56 | - $this->object->setView( $view ); |
|
| 57 | - } |
|
| 56 | + $this->object->setView( $view ); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Tears down the fixture, for example, closes a network connection. |
|
| 62 | - * This method is called after a test is executed. |
|
| 63 | - * |
|
| 64 | - * @access protected |
|
| 65 | - */ |
|
| 66 | - protected function tearDown() |
|
| 67 | - { |
|
| 68 | - unset( $this->object ); |
|
| 69 | - } |
|
| 60 | + /** |
|
| 61 | + * Tears down the fixture, for example, closes a network connection. |
|
| 62 | + * This method is called after a test is executed. |
|
| 63 | + * |
|
| 64 | + * @access protected |
|
| 65 | + */ |
|
| 66 | + protected function tearDown() |
|
| 67 | + { |
|
| 68 | + unset( $this->object ); |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | 71 | |
| 72 | - public function testGetHeader() |
|
| 73 | - { |
|
| 74 | - $output = $this->object->getHeader(); |
|
| 75 | - $this->assertNotNull( $output ); |
|
| 76 | - } |
|
| 72 | + public function testGetHeader() |
|
| 73 | + { |
|
| 74 | + $output = $this->object->getHeader(); |
|
| 75 | + $this->assertNotNull( $output ); |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | 78 | |
| 79 | - public function testGetBody() |
|
| 80 | - { |
|
| 81 | - $output = $this->object->getBody(); |
|
| 79 | + public function testGetBody() |
|
| 80 | + { |
|
| 81 | + $output = $this->object->getBody(); |
|
| 82 | 82 | |
| 83 | - $this->assertStringStartsWith( '<div class="common-summary content-block">', $output ); |
|
| 84 | - $this->assertContains( '<div class="common-summary-address container">', $output ); |
|
| 85 | - $this->assertContains( '<div class="common-summary-service container">', $output ); |
|
| 86 | - $this->assertContains( '<div class="common-summary-coupon container">', $output ); |
|
| 87 | - $this->assertContains( '<div class="common-summary-detail container">', $output ); |
|
| 88 | - } |
|
| 83 | + $this->assertStringStartsWith( '<div class="common-summary content-block">', $output ); |
|
| 84 | + $this->assertContains( '<div class="common-summary-address container">', $output ); |
|
| 85 | + $this->assertContains( '<div class="common-summary-service container">', $output ); |
|
| 86 | + $this->assertContains( '<div class="common-summary-coupon container">', $output ); |
|
| 87 | + $this->assertContains( '<div class="common-summary-detail container">', $output ); |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | 90 | |
| 91 | - public function testGetSubClient() |
|
| 92 | - { |
|
| 93 | - $client = $this->object->getSubClient( 'detail' ); |
|
| 94 | - $this->assertInstanceOf( '\Aimeos\Client\Html\Iface', $client ); |
|
| 95 | - } |
|
| 91 | + public function testGetSubClient() |
|
| 92 | + { |
|
| 93 | + $client = $this->object->getSubClient( 'detail' ); |
|
| 94 | + $this->assertInstanceOf( '\Aimeos\Client\Html\Iface', $client ); |
|
| 95 | + } |
|
| 96 | 96 | |
| 97 | 97 | |
| 98 | - public function testGetSubClientInvalid() |
|
| 99 | - { |
|
| 100 | - $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 101 | - $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 102 | - } |
|
| 98 | + public function testGetSubClientInvalid() |
|
| 99 | + { |
|
| 100 | + $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 101 | + $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 102 | + } |
|
| 103 | 103 | |
| 104 | 104 | |
| 105 | - public function testGetSubClientInvalidName() |
|
| 106 | - { |
|
| 107 | - $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 108 | - $this->object->getSubClient( '$$$', '$$$' ); |
|
| 109 | - } |
|
| 105 | + public function testGetSubClientInvalidName() |
|
| 106 | + { |
|
| 107 | + $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 108 | + $this->object->getSubClient( '$$$', '$$$' ); |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | - public function testProcess() |
|
| 113 | - { |
|
| 114 | - $this->object->process(); |
|
| 115 | - } |
|
| 112 | + public function testProcess() |
|
| 113 | + { |
|
| 114 | + $this->object->process(); |
|
| 115 | + } |
|
| 116 | 116 | } |
@@ -10,86 +10,86 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class StandardTest extends \PHPUnit_Framework_TestCase |
| 12 | 12 | { |
| 13 | - private $object; |
|
| 13 | + private $object; |
|
| 14 | 14 | |
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Sets up the fixture, for example, opens a network connection. |
|
| 18 | - * This method is called before a test is executed. |
|
| 19 | - * |
|
| 20 | - * @access protected |
|
| 21 | - */ |
|
| 22 | - protected function setUp() |
|
| 23 | - { |
|
| 24 | - $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 25 | - $this->object = new \Aimeos\Client\Html\Catalog\Detail\Actions\Standard( \TestHelperHtml::getContext(), $paths ); |
|
| 26 | - $this->object->setView( \TestHelperHtml::getView() ); |
|
| 27 | - } |
|
| 16 | + /** |
|
| 17 | + * Sets up the fixture, for example, opens a network connection. |
|
| 18 | + * This method is called before a test is executed. |
|
| 19 | + * |
|
| 20 | + * @access protected |
|
| 21 | + */ |
|
| 22 | + protected function setUp() |
|
| 23 | + { |
|
| 24 | + $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 25 | + $this->object = new \Aimeos\Client\Html\Catalog\Detail\Actions\Standard( \TestHelperHtml::getContext(), $paths ); |
|
| 26 | + $this->object->setView( \TestHelperHtml::getView() ); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Tears down the fixture, for example, closes a network connection. |
|
| 32 | - * This method is called after a test is executed. |
|
| 33 | - * |
|
| 34 | - * @access protected |
|
| 35 | - */ |
|
| 36 | - protected function tearDown() |
|
| 37 | - { |
|
| 38 | - unset( $this->object ); |
|
| 39 | - } |
|
| 30 | + /** |
|
| 31 | + * Tears down the fixture, for example, closes a network connection. |
|
| 32 | + * This method is called after a test is executed. |
|
| 33 | + * |
|
| 34 | + * @access protected |
|
| 35 | + */ |
|
| 36 | + protected function tearDown() |
|
| 37 | + { |
|
| 38 | + unset( $this->object ); |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | 41 | |
| 42 | - public function testGetHeader() |
|
| 43 | - { |
|
| 44 | - $view = $this->object->getView(); |
|
| 45 | - $view->detailProductItem = $this->getProductItem(); |
|
| 42 | + public function testGetHeader() |
|
| 43 | + { |
|
| 44 | + $view = $this->object->getView(); |
|
| 45 | + $view->detailProductItem = $this->getProductItem(); |
|
| 46 | 46 | |
| 47 | - $output = $this->object->getHeader(); |
|
| 48 | - $this->assertNotNull( $output ); |
|
| 49 | - } |
|
| 47 | + $output = $this->object->getHeader(); |
|
| 48 | + $this->assertNotNull( $output ); |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | - public function testGetBody() |
|
| 53 | - { |
|
| 54 | - $view = $this->object->getView(); |
|
| 55 | - $view->detailProductItem = $this->getProductItem(); |
|
| 52 | + public function testGetBody() |
|
| 53 | + { |
|
| 54 | + $view = $this->object->getView(); |
|
| 55 | + $view->detailProductItem = $this->getProductItem(); |
|
| 56 | 56 | |
| 57 | - $output = $this->object->getBody(); |
|
| 57 | + $output = $this->object->getBody(); |
|
| 58 | 58 | |
| 59 | - $this->assertStringStartsWith( '<!-- catalog.detail.actions -->', $output ); |
|
| 60 | - $this->assertContains( 'actions-button-pin', $output ); |
|
| 61 | - $this->assertContains( 'actions-button-watch', $output ); |
|
| 62 | - $this->assertContains( 'actions-button-favorite', $output ); |
|
| 63 | - } |
|
| 59 | + $this->assertStringStartsWith( '<!-- catalog.detail.actions -->', $output ); |
|
| 60 | + $this->assertContains( 'actions-button-pin', $output ); |
|
| 61 | + $this->assertContains( 'actions-button-watch', $output ); |
|
| 62 | + $this->assertContains( 'actions-button-favorite', $output ); |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | 65 | |
| 66 | - public function testModifyBody() |
|
| 67 | - { |
|
| 68 | - $content = '<!-- catalog.detail.actions -->test<!-- catalog.detail.actions -->'; |
|
| 69 | - $output = $this->object->modifyBody( $content, -1 ); |
|
| 66 | + public function testModifyBody() |
|
| 67 | + { |
|
| 68 | + $content = '<!-- catalog.detail.actions -->test<!-- catalog.detail.actions -->'; |
|
| 69 | + $output = $this->object->modifyBody( $content, -1 ); |
|
| 70 | 70 | |
| 71 | - $this->assertStringStartsWith( '<!-- catalog.detail.actions -->', $output ); |
|
| 72 | - } |
|
| 71 | + $this->assertStringStartsWith( '<!-- catalog.detail.actions -->', $output ); |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | 74 | |
| 75 | - public function testGetSubClient() |
|
| 76 | - { |
|
| 77 | - $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 78 | - $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 79 | - } |
|
| 75 | + public function testGetSubClient() |
|
| 76 | + { |
|
| 77 | + $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 78 | + $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | 81 | |
| 82 | - protected function getProductItem() |
|
| 83 | - { |
|
| 84 | - $manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 85 | - $search = $manager->createSearch(); |
|
| 86 | - $search->setConditions( $search->compare( '==', 'product.code', 'CNC' ) ); |
|
| 87 | - $items = $manager->searchItems( $search ); |
|
| 82 | + protected function getProductItem() |
|
| 83 | + { |
|
| 84 | + $manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 85 | + $search = $manager->createSearch(); |
|
| 86 | + $search->setConditions( $search->compare( '==', 'product.code', 'CNC' ) ); |
|
| 87 | + $items = $manager->searchItems( $search ); |
|
| 88 | 88 | |
| 89 | - if( ( $item = reset( $items ) ) === false ) { |
|
| 90 | - throw new \Exception( 'No product item with code "CNC" found' ); |
|
| 91 | - } |
|
| 89 | + if( ( $item = reset( $items ) ) === false ) { |
|
| 90 | + throw new \Exception( 'No product item with code "CNC" found' ); |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - return $item; |
|
| 94 | - } |
|
| 93 | + return $item; |
|
| 94 | + } |
|
| 95 | 95 | } |
@@ -10,91 +10,91 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class StandardTest extends \PHPUnit_Framework_TestCase |
| 12 | 12 | { |
| 13 | - private $object; |
|
| 14 | - private $context; |
|
| 13 | + private $object; |
|
| 14 | + private $context; |
|
| 15 | 15 | |
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Sets up the fixture, for example, opens a network connection. |
|
| 19 | - * This method is called before a test is executed. |
|
| 20 | - * |
|
| 21 | - * @access protected |
|
| 22 | - */ |
|
| 23 | - protected function setUp() |
|
| 24 | - { |
|
| 25 | - $this->context = \TestHelperHtml::getContext(); |
|
| 26 | - $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 17 | + /** |
|
| 18 | + * Sets up the fixture, for example, opens a network connection. |
|
| 19 | + * This method is called before a test is executed. |
|
| 20 | + * |
|
| 21 | + * @access protected |
|
| 22 | + */ |
|
| 23 | + protected function setUp() |
|
| 24 | + { |
|
| 25 | + $this->context = \TestHelperHtml::getContext(); |
|
| 26 | + $paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
| 27 | 27 | |
| 28 | - $this->object = new \Aimeos\Client\Html\Catalog\Detail\Seen\Standard( $this->context, $paths ); |
|
| 29 | - $this->object->setView( \TestHelperHtml::getView() ); |
|
| 30 | - } |
|
| 28 | + $this->object = new \Aimeos\Client\Html\Catalog\Detail\Seen\Standard( $this->context, $paths ); |
|
| 29 | + $this->object->setView( \TestHelperHtml::getView() ); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Tears down the fixture, for example, closes a network connection. |
|
| 35 | - * This method is called after a test is executed. |
|
| 36 | - * |
|
| 37 | - * @access protected |
|
| 38 | - */ |
|
| 39 | - protected function tearDown() |
|
| 40 | - { |
|
| 41 | - unset( $this->object ); |
|
| 42 | - } |
|
| 33 | + /** |
|
| 34 | + * Tears down the fixture, for example, closes a network connection. |
|
| 35 | + * This method is called after a test is executed. |
|
| 36 | + * |
|
| 37 | + * @access protected |
|
| 38 | + */ |
|
| 39 | + protected function tearDown() |
|
| 40 | + { |
|
| 41 | + unset( $this->object ); |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | - public function testGetHeader() |
|
| 46 | - { |
|
| 47 | - $output = $this->object->getHeader(); |
|
| 48 | - $this->assertNotNull( $output ); |
|
| 49 | - } |
|
| 45 | + public function testGetHeader() |
|
| 46 | + { |
|
| 47 | + $output = $this->object->getHeader(); |
|
| 48 | + $this->assertNotNull( $output ); |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | - public function testGetBody() |
|
| 53 | - { |
|
| 54 | - $output = $this->object->getHeader(); |
|
| 55 | - $this->assertEquals( '', $output ); |
|
| 56 | - } |
|
| 52 | + public function testGetBody() |
|
| 53 | + { |
|
| 54 | + $output = $this->object->getHeader(); |
|
| 55 | + $this->assertEquals( '', $output ); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | 58 | |
| 59 | - public function testGetSubClient() |
|
| 60 | - { |
|
| 61 | - $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 62 | - $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 63 | - } |
|
| 59 | + public function testGetSubClient() |
|
| 60 | + { |
|
| 61 | + $this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
| 62 | + $this->object->getSubClient( 'invalid', 'invalid' ); |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | 65 | |
| 66 | - public function testProcess() |
|
| 67 | - { |
|
| 68 | - $prodid = $this->getProductItem()->getId(); |
|
| 66 | + public function testProcess() |
|
| 67 | + { |
|
| 68 | + $prodid = $this->getProductItem()->getId(); |
|
| 69 | 69 | |
| 70 | - $session = $this->context->getSession(); |
|
| 71 | - $session->set( 'aimeos/catalog/session/seen/list', array( $prodid => 'test' ) ); |
|
| 72 | - $session->set( 'aimeos/catalog/session/seen/cache', array( $prodid => 'test' ) ); |
|
| 70 | + $session = $this->context->getSession(); |
|
| 71 | + $session->set( 'aimeos/catalog/session/seen/list', array( $prodid => 'test' ) ); |
|
| 72 | + $session->set( 'aimeos/catalog/session/seen/cache', array( $prodid => 'test' ) ); |
|
| 73 | 73 | |
| 74 | - $view = $this->object->getView(); |
|
| 75 | - $param = array( 'd_prodid' => $prodid ); |
|
| 74 | + $view = $this->object->getView(); |
|
| 75 | + $param = array( 'd_prodid' => $prodid ); |
|
| 76 | 76 | |
| 77 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); |
|
| 78 | - $view->addHelper( 'param', $helper ); |
|
| 77 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); |
|
| 78 | + $view->addHelper( 'param', $helper ); |
|
| 79 | 79 | |
| 80 | - $this->object->process(); |
|
| 80 | + $this->object->process(); |
|
| 81 | 81 | |
| 82 | - $str = $session->get( 'aimeos/catalog/session/seen/list' ); |
|
| 83 | - $this->assertInternalType( 'array', $str ); |
|
| 84 | - } |
|
| 82 | + $str = $session->get( 'aimeos/catalog/session/seen/list' ); |
|
| 83 | + $this->assertInternalType( 'array', $str ); |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | 86 | |
| 87 | - protected function getProductItem() |
|
| 88 | - { |
|
| 89 | - $manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 90 | - $search = $manager->createSearch(); |
|
| 91 | - $search->setConditions( $search->compare( '==', 'product.code', 'CNE' ) ); |
|
| 92 | - $items = $manager->searchItems( $search ); |
|
| 87 | + protected function getProductItem() |
|
| 88 | + { |
|
| 89 | + $manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperHtml::getContext() ); |
|
| 90 | + $search = $manager->createSearch(); |
|
| 91 | + $search->setConditions( $search->compare( '==', 'product.code', 'CNE' ) ); |
|
| 92 | + $items = $manager->searchItems( $search ); |
|
| 93 | 93 | |
| 94 | - if( ( $item = reset( $items ) ) === false ) { |
|
| 95 | - throw new \Exception( 'No product item with code "CNE" found' ); |
|
| 96 | - } |
|
| 94 | + if( ( $item = reset( $items ) ) === false ) { |
|
| 95 | + throw new \Exception( 'No product item with code "CNE" found' ); |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - return $item; |
|
| 99 | - } |
|
| 98 | + return $item; |
|
| 99 | + } |
|
| 100 | 100 | } |