Skip to content

Commit

Permalink
Do not pass array of interfaces when creating mock as it is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Spea committed Jun 3, 2022
1 parent d7eb3f1 commit f05b567
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tests/Fixtures/DummyJmsSerializer.php
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace Tests\Liip\Serializer\Adapter\JMS\Fixtures;

use JMS\Serializer\ArrayTransformerInterface;
use JMS\Serializer\SerializerInterface;

interface DummyJmsSerializer extends SerializerInterface, ArrayTransformerInterface
{
}
3 changes: 2 additions & 1 deletion tests/Unit/JMSSerializerAdapterTest.php
Expand Up @@ -14,6 +14,7 @@
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
use Tests\Liip\Serializer\Adapter\JMS\Fixtures\DummyJmsSerializer;
use Tests\Liip\Serializer\Adapter\JMS\Fixtures\TestModel;

/**
Expand All @@ -40,7 +41,7 @@ class JMSSerializerAdapterTest extends TestCase

protected function setUp(): void
{
$this->jms = $this->createMock([SerializerInterface::class, ArrayTransformerInterface::class]);
$this->jms = $this->createMock(DummyJmsSerializer::class);
$this->liip = $this->createMock(LiipSerializer::class);
$this->model = new TestModel();
}
Expand Down

0 comments on commit f05b567

Please sign in to comment.