Skip to content

Commit

Permalink
#27500 Prepare CardinalCommerce module Tests for PHPUnit 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz committed Apr 11, 2020
1 parent 86515dd commit 8141fce
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

use Magento\CardinalCommerce\Model\JwtManagement;
use Magento\Framework\Serialize\Serializer\Json;
use PHPUnit\Framework\TestCase;

/**
* Tests JWT encode and decode.
*/
class JwtManagementTest extends \PHPUnit\Framework\TestCase
class JwtManagementTest extends TestCase
{
/**
* API key
Expand All @@ -28,7 +29,7 @@ class JwtManagementTest extends \PHPUnit\Framework\TestCase
/**
* @inheritdoc
*/
protected function setUp()
protected function setUp(): void
{
$this->model = new JwtManagement(new Json());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@

namespace Magento\CardinalCommerce\Test\Unit\Model\Response;

use Magento\CardinalCommerce\Model\Response\JwtParser;
use Magento\CardinalCommerce\Model\Config;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\CardinalCommerce\Model\JwtManagement;
use Magento\CardinalCommerce\Model\Response\JwtParser;
use Magento\CardinalCommerce\Model\Response\JwtPayloadValidatorInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

/**
* Class \Magento\CardinalCommerce\Test\Unit\Model\Response\JwtParserTest
*/
class JwtParserTest extends \PHPUnit\Framework\TestCase
class JwtParserTest extends TestCase
{
/**
* @var ObjectManager
Expand All @@ -30,24 +29,24 @@ class JwtParserTest extends \PHPUnit\Framework\TestCase
private $model;

/**
* @var \PHPUnit_Framework_MockObject_MockObject | Config
* @var MockObject|Config
*/
private $configMock;

/**
* @var \PHPUnit_Framework_MockObject_MockObject | JwtManagement
* @var MockObject|JwtManagement
*/
private $jwtManagementMock;

/**
* @var \PHPUnit_Framework_MockObject_MockObject | JwtPayloadValidatorInterface
* @var MockObject|JwtPayloadValidatorInterface
*/
private $jwtPayloadValidatorMock;

/**
* @inheritdoc
*/
protected function setUp()
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@

use Magento\CardinalCommerce\Model\Response\JwtPayloadValidator;
use Magento\Framework\Intl\DateTimeFactory;
use PHPUnit\Framework\TestCase;

/**
* Class JwtPayloadValidatorTest
*/
class JwtPayloadValidatorTest extends \PHPUnit\Framework\TestCase
class JwtPayloadValidatorTest extends TestCase
{
/**
* @var JwtPayloadValidator
Expand All @@ -23,7 +21,7 @@ class JwtPayloadValidatorTest extends \PHPUnit\Framework\TestCase
/**
* @inheritdoc
*/
protected function setUp()
protected function setUp(): void
{
$this->model = new JwtPayloadValidator(new DateTimeFactory());
}
Expand Down

0 comments on commit 8141fce

Please sign in to comment.