Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
replace deprecated PHPUnit methods
  • Loading branch information
Art4 committed Jul 19, 2024
commit 6b0e7bd58b9602273754c037e7e65e4f5cf48456
8 changes: 4 additions & 4 deletions tests/Fixtures/V1Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Art4\JsonApiClient\Tests\Fixtures;

use Art4\JsonApiClient\Factory as FactoryInterface;
use PHPUnit\Framework\MockObject\MockBuilder;
use PHPUnit\Framework\TestCase;

final class V1Factory implements FactoryInterface
Expand All @@ -33,11 +34,10 @@ public function __construct(TestCase $testcase)
*/
public function make($name, array $args = [])
{
return $this->testcase->getMockBuilder(AccessableElement::class)
return (new MockBuilder($this->testcase, AccessableElement::class))
->disableOriginalConstructor()
->disableOriginalClone()
->disableArgumentCloning()
->disallowMockingUnknownTypes()
->getMock();
->getMock()
;
}
}