[PhpUnitBridge] Make ClockMock match namespaces that begin with Tests\\
This commit is contained in:
parent
f0953dab1d
commit
2630c13671
@ -77,6 +77,8 @@ class ClockMock
|
||||
if (0 < strpos($class, '\\Tests\\')) {
|
||||
$ns = str_replace('\\Tests\\', '\\', $class);
|
||||
$mockedNs[] = substr($ns, 0, strrpos($ns, '\\'));
|
||||
} elseif (0 === strpos($class, 'Tests\\')) {
|
||||
$mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6);
|
||||
}
|
||||
foreach ($mockedNs as $ns) {
|
||||
if (function_exists($ns.'\time')) {
|
||||
|
Reference in New Issue
Block a user