mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 12:29:43 +01:00
Extend AddDoesNotPerformAssertionToNonAssertingTestRector by ca… (#2645)
Extend AddDoesNotPerformAssertionToNonAssertingTestRector by catching more test messages
This commit is contained in:
commit
0ea5e8df5b
@ -167,7 +167,7 @@ PHP
|
||||
}
|
||||
|
||||
// A. try "->assert" shallow search first for performance
|
||||
$hasDirectAssertCall = (bool) $this->hasDirectAssertCall($classMethod);
|
||||
$hasDirectAssertCall = $this->hasDirectAssertCall($classMethod);
|
||||
if ($hasDirectAssertCall) {
|
||||
$this->containsAssertCallByClassMethod[$cacheHash] = $hasDirectAssertCall;
|
||||
return $hasDirectAssertCall;
|
||||
@ -187,7 +187,18 @@ PHP
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->isNames($node->name, ['assert*', 'expectException*', 'setExpectedException*']);
|
||||
return $this->isNames($node->name, [
|
||||
// prophecy
|
||||
'should*',
|
||||
'should',
|
||||
'expect*',
|
||||
'expect',
|
||||
// phpunit
|
||||
'*assert',
|
||||
'assert*',
|
||||
'expectException*',
|
||||
'setExpectedException*',
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user