21use PHPUnit\Framework\Attributes\BackupGlobals;
22use PHPUnit\Framework\Attributes\BackupStaticProperties;
23use PHPUnit\Framework\Attributes\PreserveGlobalState;
24use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
32use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
33use PHPUnit\Framework\TestCase;
36require_once(
'./vendor/composer/vendor/autoload.php');
43#[BackupGlobals(false)]
44#[BackupStaticProperties(false)]
45#[PreserveGlobalState(false)]
46#[RunTestsInSeparateProcesses]
49 use MockeryPHPUnitIntegration;
61 protected function setUp(): void
65 $plugin_mock = Mockery::mock(ilPlugin::class);
67 $this->provider_mock = Mockery::mock(Provider::class);
68 $this->provider_mock->shouldReceive(
'getProviderNameForPresentation')->andReturn(
'Provider')->byDefault();
70 $provider_factory = Mockery::mock(ProviderFactory::class);
71 $provider_factory->shouldReceive(
'getProviderByClassName')->with(self::MOCKED_PROVIDER_CLASSNAME)->andReturn($this->provider_mock);
72 $provider_factory->shouldReceive(
'isInstanceCreationPossible')->andReturn(
true);
73 $provider_factory->shouldReceive(
'isRegistered')->andReturn(
true);
82 $this->expectException(LogicException::class);
83 $this->identification->core($this->provider_mock)->identifier($string);
90 $this->identification->core($this->provider_mock)->identifier($string);
91 $this->assertTrue(
true);
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
Class IdentificationFactoryTest.
testMustThrowExceptionSinceSerializedIdentificationIsTooLong()
IdentificationFactory $identification
const MOCKED_PROVIDER_CLASSNAME
testMustNotThrowExceptionSinceSerializedIdentificationIsExactLength()
Interface SerializerInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...