-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #416 from magento-folks/2.0.11_bugs_pr
[Folks] 2.0.11 bugs - MAGETWO-56955 [Backport] - Validation message displayed all the time - for 2.0 - MAGETWO-57681 [GITHUB] Customer cannot reorder if the order has been invoiced or shipped #6278
- Loading branch information
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/OrderItemTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Model\ResourceModel; | ||
|
||
class OrderItemTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \Magento\Framework\ObjectManagerInterface | ||
*/ | ||
private $objectManager; | ||
|
||
protected function setUp() | ||
{ | ||
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); | ||
} | ||
|
||
/** | ||
* Verify that serialized order item data was unserialized after load | ||
* | ||
* @magentoDataFixture Magento/Catalog/_files/order_item_with_product_and_custom_options.php | ||
*/ | ||
public function testGetOrderItem() | ||
{ | ||
/** @var \Magento\Sales\Model\Order $order */ | ||
$order = $this->objectManager->create(\Magento\Sales\Model\Order::class); | ||
$order->loadByIncrementId('100000001'); | ||
$items = $order->getItemsCollection(); | ||
$this->assertNotEquals(0, $items->getSize()); | ||
foreach ($items as $item) { | ||
$info = $item->getDataByKey('product_options'); | ||
$this->assertTrue(is_array($info)); | ||
} | ||
} | ||
} |