‪TYPO3CMS  10.4
AdminRecycleTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
24 {
30  protected ‪$assertionDataSetDirectory = 'typo3/sysext/recycler/Tests/Functional/Recycle/Pages/DataSet/Assertion/';
31 
35  protected function ‪setUp(): void
36  {
37  parent::setUp();
38  $this->importDataSet(__DIR__ . '/../../Fixtures/Database/pages.xml');
39  // Set up "admin" user
40  $this->setUpBackendUserFromFixture(1);
41  }
42 
46  public function ‪retrieveDeletedPagesNoRecursion()
47  {
48  $deletedPages = $this->‪getDeletedPages(1, 0);
49  $assertData = $this->‪loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3.xml');
50  self::assertCount(1, $deletedPages);
51  self::assertArrayHasKey('pages', $deletedPages);
52  self::assertCount(3, $deletedPages['pages']);
53  self::assertSame($assertData[0]['uid'], $deletedPages[0]['uid']);
54  }
55 
60  {
61  $deletedPages = $this->‪getDeletedPages(1, 1);
62  $assertData = $this->‪loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3_4_5_7.xml');
63  self::assertCount(1, $deletedPages);
64  self::assertArrayHasKey('pages', $deletedPages);
65  self::assertCount(4, $deletedPages['pages']);
66  self::assertSame($assertData[0]['uid'], $deletedPages[0]['uid']);
67  }
68 }
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\AbstractRecycleTestCase\getDeletedPages
‪array getDeletedPages($pageUid, $depth=0)
Definition: AbstractRecycleTestCase.php:56
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\AbstractRecycleTestCase
Definition: AbstractRecycleTestCase.php:27
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages\AdminRecycleTest\setUp
‪setUp()
Definition: AdminRecycleTest.php:34
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages\AdminRecycleTest\retrieveDeletedPagesOneLevelRecursion
‪retrieveDeletedPagesOneLevelRecursion()
Definition: AdminRecycleTest.php:58
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages\AdminRecycleTest
Definition: AdminRecycleTest.php:24
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages
Definition: AdminRecycleTest.php:16
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages\AdminRecycleTest\retrieveDeletedPagesNoRecursion
‪retrieveDeletedPagesNoRecursion()
Definition: AdminRecycleTest.php:45
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\Pages\AdminRecycleTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: AdminRecycleTest.php:29
‪TYPO3\CMS\Recycler\Tests\Functional\Recycle\AbstractRecycleTestCase\loadDataSet
‪array loadDataSet($path)
Definition: AbstractRecycleTestCase.php:85