mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
32 lines
982 B
PHP
32 lines
982 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Magento\Integration\Test\Unit\Model;
|
|
|
|
use Magento\Integration\Api\Data\UserToken;
|
|
use Magento\Integration\Api\UserTokenValidatorInterface;
|
|
use Magento\Integration\Model\CompositeUserTokenValidator;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class CompositeUserTokenValidatorTest extends TestCase
|
|
{
|
|
public function testValidate(): void
|
|
{
|
|
$userToken = $this->createMock(UserToken::class);
|
|
|
|
$validator1 = $this->createMock(UserTokenValidatorInterface::class);
|
|
$validator1->expects($this->once())->method('validate')->with($userToken);
|
|
|
|
$validator2 = $this->createMock(UserTokenValidatorInterface::class);
|
|
$validator2->expects($this->once())->method('validate')->with($userToken);
|
|
|
|
$model = new CompositeUserTokenValidator([$validator1, $validator2]);
|
|
$model->validate($userToken);
|
|
}
|
|
}
|