-
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.
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #15986: Added unit test for CaptchaStringResolver (by @rogyar) - #15644: [Forwardport] Fixed Purchased Order Form button should visible properly (by @vgelani) - #15768: [Forwardport] FIX for issue #15457 - Bundle Products price range is showing expired� (by @sanjay-wagento) - #15766: [Forwardport] FIX fo rissue #15510 - First PDF download / export after login (by @sanjay-wagento) Fixed GitHub Issues: - #15457: Bundle Products price range is showing expired special price from bundle options (reported by @harleen-mann) has been fixed in #15768 by @sanjay-wagento in 2.3-develop branch Related commits: 1. e13f1f0 - #15510: First PDF download / export after login (reported by @anthony-jullien) has been fixed in #15766 by @sanjay-wagento in 2.3-develop branch Related commits: 1. d58ab5f
- Loading branch information
Showing
4 changed files
with
81 additions
and
2 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
69 changes: 69 additions & 0 deletions
69
app/code/Magento/Captcha/Test/Unit/Observer/CaptchaStringResolverTest.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,69 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Captcha\Test\Unit\Observer; | ||
|
||
use Magento\Captcha\Helper\Data as CaptchaDataHelper; | ||
use Magento\Captcha\Observer\CaptchaStringResolver; | ||
use Magento\Framework\App\Request\Http as HttpRequest; | ||
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; | ||
|
||
class CaptchaStringResolverTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
/** | ||
* @var ObjectManager | ||
*/ | ||
private $objectManagerHelper; | ||
|
||
/** | ||
* @var CaptchaStringResolver | ||
*/ | ||
private $captchaStringResolver; | ||
|
||
/** | ||
* @var HttpRequest|\PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
private $requestMock; | ||
|
||
protected function setUp() | ||
{ | ||
$this->objectManagerHelper = new ObjectManager($this); | ||
$this->requestMock = $this->createMock(HttpRequest::class); | ||
$this->captchaStringResolver = $this->objectManagerHelper->getObject(CaptchaStringResolver::class); | ||
} | ||
|
||
public function testResolveWithFormIdSet() | ||
{ | ||
$formId = 'contact_us'; | ||
$captchaValue = 'some-value'; | ||
|
||
$this->requestMock->expects($this->once()) | ||
->method('getPost') | ||
->with(CaptchaDataHelper::INPUT_NAME_FIELD_VALUE) | ||
->willReturn([$formId => $captchaValue]); | ||
|
||
self::assertEquals( | ||
$this->captchaStringResolver->resolve($this->requestMock, $formId), | ||
$captchaValue | ||
); | ||
} | ||
|
||
public function testResolveWithNoFormIdInRequest() | ||
{ | ||
$formId = 'contact_us'; | ||
|
||
$this->requestMock->expects($this->once()) | ||
->method('getPost') | ||
->with(CaptchaDataHelper::INPUT_NAME_FIELD_VALUE) | ||
->willReturn([]); | ||
|
||
self::assertEquals( | ||
$this->captchaStringResolver->resolve($this->requestMock, $formId), | ||
'' | ||
); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -63,6 +63,10 @@ | |
} | ||
} | ||
} | ||
|
||
#po_number { | ||
margin-bottom: 20px; | ||
} | ||
} | ||
|
||
.payment-method-title { | ||
|