You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A rector would be nice that looks for classes that extend PHPUnit\Framework\TestCase and call $this->prophesize(). The class needs to be changed to use the Prophecy\PhpUnit\ProphecyTrait trait:
use PHPUnit\Framework\TestCase;
+use Prophecy\PhpUnit\ProphecyTrait;
final class ExampleTest extends TestCase
{
+ use ProphecyTrait;+
public function testOne(): void
{
$prophecy = $this->prophesize(\AnInterface::class);
The text was updated successfully, but these errors were encountered:
TomasVotruba
changed the title
Migrate PHPUnit test class from built-in Prophecy integration to trait
[PHPUnit 9.1] Migrate PHPUnit test class from built-in Prophecy integration to trait
Mar 31, 2020
The tight integration of Prophecy into PHPUnit is deprecated in PHPUnit 9.1 and will be removed in PHPUnit 10.
A rector would be nice that looks for classes that extend
PHPUnit\Framework\TestCase
and call$this->prophesize()
. The class needs to be changed to use theProphecy\PhpUnit\ProphecyTrait
trait:The text was updated successfully, but these errors were encountered: