2 declare(strict_types = 1);
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
40 protected function setUp()
43 $this->backendUser = $this->prophesize(BackendUserAuthentication::class);
52 $this->backendUser->reveal()->uc = [
59 $this->assertEquals(
'A', $this->backendUserConfiguration->get(
'key'));
60 $this->assertEquals(
'B', $this->backendUserConfiguration->get(
'nested.key'));
72 $this->backendUser->reveal()->uc = $configuration;
74 $this->assertEquals($configuration, $this->backendUserConfiguration->getAll());
82 $this->backendUser->reveal()->uc = [
86 $this->backendUserConfiguration->set(
'foo',
'X');
87 $this->backendUserConfiguration->set(
'bar',
'Y');
88 $this->backendUserConfiguration->set(
'nested.bar',
'Z');
98 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
106 $this->backendUser->reveal()->uc = [
113 $this->backendUserConfiguration->addToList(
'foo',
'X');
114 $this->backendUserConfiguration->addToList(
'nested.foo',
'X');
115 $this->backendUserConfiguration->addToList(
'nested.foo',
'Z');
116 $this->backendUserConfiguration->addToList(
'nested.foo',
'Z');
124 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
131 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
138 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
146 $this->backendUser->reveal()->uc = [
153 $this->backendUserConfiguration->removeFromList(
'foo',
'B');
154 $this->backendUserConfiguration->removeFromList(
'nested.foo',
'B');
155 $this->backendUserConfiguration->removeFromList(
'nested.foo',
'B');
163 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
170 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();
178 $this->backendUserConfiguration->clear();
180 $this->backendUser->resetUC()->shouldHaveBeenCalled();
188 $this->backendUser->reveal()->uc = [
193 $this->backendUserConfiguration->unsetOption(
'foo');
194 $this->backendUserConfiguration->unsetOption(
'foo');
199 $this->backendUser->writeUC($expected)->shouldHaveBeenCalled();