-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 #429 from magento-folks/checkout
[Folks]Bugfix
- Loading branch information
Showing
39 changed files
with
919 additions
and
286 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
app/code/Magento/Captcha/Test/Unit/Model/Cart/ConfigPluginTest.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,46 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Captcha\Test\Unit\Model\Cart; | ||
|
||
class ConfigPluginTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \Magento\Captcha\Model\Cart\ConfigPlugin | ||
*/ | ||
protected $model; | ||
|
||
/** | ||
* @var \PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
protected $configProviderMock; | ||
|
||
public function setUp() | ||
{ | ||
$this->configProviderMock = $this->getMock('\Magento\Captcha\Model\Checkout\ConfigProvider', [], [], '', false); | ||
$this->model = new \Magento\Captcha\Model\Cart\ConfigPlugin( | ||
$this->configProviderMock | ||
); | ||
} | ||
|
||
public function testAfterGetConfig() | ||
{ | ||
$resultMock = [ | ||
'result' => [ | ||
'data' => 'resultDataMock' | ||
] | ||
]; | ||
$configMock = [ | ||
'config' => [ | ||
'data' => 'configDataMock' | ||
] | ||
]; | ||
$expectedResult = array_merge_recursive($resultMock, $configMock); | ||
$sidebarMock = $this->getMock('\Magento\Checkout\Block\Cart\Sidebar', [], [], '', false); | ||
$this->configProviderMock->expects($this->once())->method('getConfig')->willReturn($configMock); | ||
|
||
$this->assertEquals($expectedResult, $this->model->afterGetConfig($sidebarMock, $resultMock)); | ||
} | ||
} |
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
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.