‪TYPO3CMS  ‪main
PagesRepositoryTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use PHPUnit\Framework\Attributes\Test;
22 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
23 
24 final class ‪PagesRepositoryTest extends FunctionalTestCase
25 {
26  #[Test]
28  {
29  $pageInfo = [
30  'uid' => 4,
31  'pid' => 3,
32  'hidden' => false,
33  'extendToSubpages' => false,
34  ];
35 
36  $this->importCSVDataSet(__DIR__ . '/Fixtures/PagesRepositoryTest/rootline_with_hidden_and_extendToSubpages.csv');
37  $pagesRepository = new ‪PagesRepository();
38  $result = $pagesRepository->doesRootLineContainHiddenPages($pageInfo);
39  self::assertTrue($result);
40  }
41 
42  #[Test]
44  {
45  $pageInfo = [
46  'uid' => 4,
47  'pid' => 3,
48  'hidden' => false,
49  'extendToSubpages' => false,
50  ];
51 
52  $this->importCSVDataSet(__DIR__ . '/Fixtures/PagesRepositoryTest/rootline_without_hidden_and_extendToSubpages.csv');
53  $pagesRepository = new ‪PagesRepository();
54  $result = $pagesRepository->doesRootLineContainHiddenPages($pageInfo);
55  self::assertFalse($result);
56  }
57 }
‪TYPO3\CMS\Linkvalidator\Repository\PagesRepository
Definition: PagesRepository.php:33
‪TYPO3\CMS\Linkvalidator\Tests\Functional\Repository\PagesRepositoryTest\doesRootLineContainHiddenPagesReturnsCorrectResultWith
‪doesRootLineContainHiddenPagesReturnsCorrectResultWith()
Definition: PagesRepositoryTest.php:27
‪TYPO3\CMS\Linkvalidator\Tests\Functional\Repository
Definition: BrokenLinkRepositoryTest.php:18
‪TYPO3\CMS\Linkvalidator\Tests\Functional\Repository\PagesRepositoryTest
Definition: PagesRepositoryTest.php:25
‪TYPO3\CMS\Linkvalidator\Tests\Functional\Repository\PagesRepositoryTest\doesRootLineContainHiddenPagesReturnsCorrectResultWithout
‪doesRootLineContainHiddenPagesReturnsCorrectResultWithout()
Definition: PagesRepositoryTest.php:43