Run Rector on your code to see what it can do for you:
public function test() { self::any(); - self::never(); - self::atLeast(); - self::atLeastOnce(); - self::once(); + $this->never(); + $this->atLeast(); + $this->atLeastOnce(); + $this->once(); self::exactly(); self::atMost(); self::throwException();
self::getActualOutputForAssertion(); self::expectOutputRegex(); self::expectOutputString(); - self::expectException(); - self::expectExceptionCode(); - self::expectExceptionMessage(); - self::expectExceptionMessageMatches(); + $this->expectException(); + $this->expectExceptionCode(); + $this->expectExceptionMessage(); + $this->expectExceptionMessageMatches(); self::expectExceptionObject(); self::expectNotToPerformAssertions(); self::getMockBuilder(); } }
Applied Rules:
Not a change you expect?
rector.php