protected function setUp(): void
{ ClassExistsMock::
withMockedClasses([ ExistingClass::
class => false,
'NonExistingClass' => true,
ExistingInterface::
class => false,
'NonExistingInterface' => true,
ExistingTrait::
class => false,
'NonExistingTrait' => true,
]);
ClassExistsMock::
withMockedEnums([ 'NonExistingEnum' => true,
]);
} public function testClassExists() { $this->
assertFalse(class_exists(ExistingClass::
class));
$this->
assertFalse(class_exists(ExistingClass::
class, false
));
$this->
assertFalse(class_exists('\\'.ExistingClass::
class));
$this->
assertFalse(class_exists('\\'.ExistingClass::
class, false
));
$this->
assertTrue(class_exists('NonExistingClass'
));