We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit aa84ab16 authored by Marcos Garcia's avatar Marcos Garcia Committed by GitHub

Fix ApiKeyEndingTest (#510)

parent 530139f4
...@@ -4,8 +4,10 @@ namespace Adyen\Payment\Test\Comment; ...@@ -4,8 +4,10 @@ namespace Adyen\Payment\Test\Comment;
use Adyen\Payment\Model\Comment\ApiKeyEnding; use Adyen\Payment\Model\Comment\ApiKeyEnding;
use Magento\Framework\Encryption\Encryptor; use Magento\Framework\Encryption\Encryptor;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
class ApiKeyEndingTest extends \PHPUnit\Framework\TestCase class ApiKeyEndingTest extends TestCase
{ {
/** /**
* @var ApiKeyEnding * @var ApiKeyEnding
...@@ -14,6 +16,7 @@ class ApiKeyEndingTest extends \PHPUnit\Framework\TestCase ...@@ -14,6 +16,7 @@ class ApiKeyEndingTest extends \PHPUnit\Framework\TestCase
public function setUp() public function setUp()
{ {
/** @var MockObject|Encryptor $encryptor */
$encryptor = $this->createMock(Encryptor::class); $encryptor = $this->createMock(Encryptor::class);
$map = [ $map = [
['4321', '1234'], ['4321', '1234'],
...@@ -27,7 +30,7 @@ class ApiKeyEndingTest extends \PHPUnit\Framework\TestCase ...@@ -27,7 +30,7 @@ class ApiKeyEndingTest extends \PHPUnit\Framework\TestCase
public function testCommentReturnsJustTheEnding() public function testCommentReturnsJustTheEnding()
{ {
$this->assertEquals('API key ending with: <strong>1234</strong>', $this->apiKeyEndingComment->getCommentText('4321')); $this->assertEquals('Key stored ending in <strong>1234</strong>', $this->apiKeyEndingComment->getCommentText('4321'));
$this->assertEquals('API key ending with: <strong>qwer</strong>', $this->apiKeyEndingComment->getCommentText('asdfasdfasdf')); $this->assertEquals('Key stored ending in <strong>qwer</strong>', $this->apiKeyEndingComment->getCommentText('asdfasdfasdf'));
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment