Skip to content

Commit

Permalink
Fixed mocking issue with interface
Browse files Browse the repository at this point in the history
  • Loading branch information
henrym2 committed Sep 1, 2020
1 parent acfff0d commit 28a9dc9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/COOPCOEPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

use Ise\WebSecurityBundle\EventSubscriber\ResponseSubscriber;
use Ise\WebSecurityBundle\Options\ConfigProvider;
use Ise\WebSecurityBundle\Options\ContextChecker;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
Expand All @@ -28,8 +30,13 @@ class COOPCOEPTest extends TestCase

public function testCOOP()
{
$logger = $this->getMockBuilder(LoggerInterface::class)
->disableOriginalConstructor()
->getMock();
$context = new ContextChecker($logger);
$requestSub = new ResponseSubscriber(
new ConfigProvider($this->default, [])
new ConfigProvider($this->default, []),
$context
);

$kernel = $this->getMockBuilder(HttpKernelInterface::class)
Expand All @@ -51,8 +58,13 @@ public function testCOOP()

public function testCOEP()
{
$logger = $this->getMockBuilder(LoggerInterface::class)
->disableOriginalConstructor()
->getMock();
$context = new ContextChecker($logger);
$requestSub = new ResponseSubscriber(
new ConfigProvider($this->default, [])
new ConfigProvider($this->default, []),
$context
);

$kernel = $this->getMockBuilder(HttpKernelInterface::class)
Expand Down

0 comments on commit 28a9dc9

Please sign in to comment.