21use PHPUnit\Framework\Attributes\BackupGlobals;
22use PHPUnit\Framework\Attributes\BackupStaticProperties;
23use PHPUnit\Framework\Attributes\PreserveGlobalState;
24use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
30use PHPUnit\Framework\TestCase;
33require_once(
'./vendor/composer/vendor/autoload.php');
40#[BackupGlobals(false)]
41#[BackupStaticProperties(false)]
42#[PreserveGlobalState(false)]
43#[RunTestsInSeparateProcesses]
54 protected function setUp(): void
58 $this->provider_mock = $this->createStub(Provider::class);
59 $this->provider_mock->method(
'getProviderNameForPresentation')->willReturn(
'Provider');
60 $this->provider_class_name = $this->provider_mock::class;
62 $provider_factory = $this->createStub(ProviderFactory::class);
63 $provider_factory->method(
'getProviderByClassName')->willReturnMap([
64 [$this->provider_class_name, $this->provider_mock],
66 $provider_factory->method(
'isInstanceCreationPossible')->willReturn(
true);
67 $provider_factory->method(
'isRegistered')->willReturn(
true);
76 $this->expectException(LogicException::class);
77 $this->identification->core($this->provider_mock)->identifier($string);
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
core(Provider $provider)
Returns a IdentificationProvider for core components, only a Provider is needed.
Class IdentificationTest.
testMustThrowExceptionSinceSerializedIdentificationIsTooLong()
IdentificationFactory $identification
string $provider_class_name
testMustNotThrowExceptionSinceSerializedIdentificationIsExactLength()
Interface SerializerInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...