2 declare(strict_types = 1);
21 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
49 protected function setUp():
void
51 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockBeUserToDBmounts'] = 1;
52 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'cookieName'] =
'be_typo_user';
53 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'warning_email_addr'] =
'';
54 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockIP'] = 4;
55 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'sessionTimeout'] = 28800;
59 $this->importDataSet(__DIR__ .
'/Fixtures/be_groups.xml');
60 $this->importDataSet(__DIR__ .
'/Fixtures/pages.xml');
61 $this->setUpBackendUserFromFixture(2);
71 $result = $this->subject->isInWebMount(2);
72 $this->assertNotNull($result);
80 $result = $this->subject->returnWebmounts();
82 self::assertNotContains(
'3', $result,
'Deleted page is not filtered out');
83 self::assertNotContains(
'4', $result,
'Page user has no permission to read is not filtered out');
84 self::assertNotContains(
'5', $result,
'Not existing page is not filtered out');
85 self::assertContains(
'40', $result,
'Accessible db mount page, child of a not accessible page is not shown');
86 self::assertEquals([
'1',
'40'], $result);