Skip to content

Commit

Permalink
replace deprecated PHPUnit methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Jul 19, 2024
1 parent 850ca74 commit 6b0e7bd
Showing 1 changed file with 4 additions and 4 deletions.
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()
;
}
}

0 comments on commit 6b0e7bd

Please sign in to comment.