-
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 remote-tracking branch 'origin/develop' into UI
- Loading branch information
Showing
36 changed files
with
842 additions
and
219 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
|
||
/** | ||
* Interface Stock | ||
* @api | ||
*/ | ||
interface StockInterface extends ExtensibleDataInterface | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
|
||
/** | ||
* Interface StockItem | ||
* @api | ||
*/ | ||
interface StockItemInterface extends ExtensibleDataInterface | ||
{ | ||
|
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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockConfigurationInterface | ||
* @api | ||
*/ | ||
interface StockConfigurationInterface | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockIndexInterface | ||
* @api | ||
*/ | ||
interface StockIndexInterface | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockItemRepository | ||
* @api | ||
*/ | ||
interface StockItemRepositoryInterface | ||
{ | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockManagementInterface | ||
* @api | ||
*/ | ||
interface StockManagementInterface | ||
{ | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockRegistryInterface | ||
* @api | ||
*/ | ||
interface StockRegistryInterface | ||
{ | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockRepositoryInterface | ||
* @api | ||
*/ | ||
interface StockRepositoryInterface | ||
{ | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockStateInterface | ||
* @api | ||
*/ | ||
interface StockStateInterface | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/** | ||
* Interface StockStatusRepositoryInterface | ||
* @api | ||
*/ | ||
interface StockStatusRepositoryInterface | ||
{ | ||
|
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
59 changes: 59 additions & 0 deletions
59
app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.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,59 @@ | ||
<?php | ||
/*** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Cms\Test\Unit\Ui\Component\Listing\Column; | ||
|
||
class PageActionsTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testPrepareItemsByPageId() | ||
{ | ||
// Create Mocks and SUT | ||
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); | ||
/** @var \PHPUnit_Framework_MockObject_MockObject $urlBuilderMock */ | ||
$urlBuilderMock = $this->getMockBuilder('Magento\Framework\UrlInterface') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
$inputUrl = 'href/url/for/edit/action'; | ||
|
||
/** @var \Magento\Cms\Ui\Component\Listing\Column\PageActions $model */ | ||
$model = $objectManager->getObject( | ||
'Magento\Cms\Ui\Component\Listing\Column\PageActions', | ||
[ | ||
'urlBuilder' => $urlBuilderMock, | ||
'url' => $inputUrl | ||
] | ||
); | ||
|
||
// Define test input and expectations | ||
$items = [['page_id' => 1]]; | ||
$fullUrl = 'full-url-including-base.com/href/url/for/edit/action'; | ||
$name = 'item_name'; | ||
|
||
$editArray = [ | ||
'href' => $fullUrl, | ||
'label' => __('Edit'), | ||
'hidden' => true | ||
]; | ||
$expectedItems = [ | ||
[ | ||
'page_id' => 1, | ||
$name => ['edit' => $editArray] | ||
] | ||
]; | ||
|
||
// Configure mocks and object data | ||
$urlBuilderMock->expects($this->once()) | ||
->method('getUrl') | ||
->with($inputUrl, ['page_id' => 1]) | ||
->willReturn($fullUrl); | ||
|
||
$model->setName($name); | ||
// Run test | ||
$this->assertEquals( | ||
$expectedItems, | ||
$model->prepareItems($items) | ||
); | ||
} | ||
} |
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
Oops, something went wrong.