-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
530 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/.github/ export-ignore | ||
/Build/ export-ignore | ||
/Tests/ export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Boilerplate for a functional test suite setup. | ||
This file is loosely maintained within TYPO3 testing-framework, extensions | ||
are encouraged to not use it directly, but to copy it to an own place, | ||
for instance Build/FunctionalTests.xml. | ||
Note FunctionalTestsBootstrap.php should be copied along the way. | ||
Functional tests should extend \TYPO3\TestingFramework\Core\Tests\FunctionalTestCase, | ||
take a look at this class for further documentation on how to run the suite. | ||
TYPO3 CMS functional test suite also needs phpunit bootstrap code, the | ||
file is located next to this .xml as FunctionalTestsBootstrap.php | ||
--> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd" | ||
backupGlobals="true" | ||
bootstrap="FunctionalTestsBootstrap.php" | ||
cacheDirectory=".phpunit.cache" | ||
cacheResult="false" | ||
colors="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="false" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true" | ||
failOnDeprecation="false" | ||
failOnNotice="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
requireCoverageMetadata="false" | ||
> | ||
<testsuites> | ||
<testsuite name="Functional tests"> | ||
<!-- | ||
This path either needs an adaption in extensions, or an extension's | ||
test location path needs to be given to phpunit. | ||
--> | ||
<directory>../../../../../../typo3/sysext/*/Tests/Functional/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<ini name="display_errors" value="1"/> | ||
<env name="TYPO3_CONTEXT" value="Testing"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Boilerplate for a functional test phpunit boostrap file. | ||
* | ||
* This file is loosely maintained within TYPO3 testing-framework, extensions | ||
* are encouraged to not use it directly, but to copy it to an own place, | ||
* usually in parallel to a FunctionalTests.xml file. | ||
* | ||
* This file is defined in FunctionalTests.xml and called by phpunit | ||
* before instantiating the test suites. | ||
*/ | ||
(static function () { | ||
$testbase = new \TYPO3\TestingFramework\Core\Testbase(); | ||
$testbase->defineOriginalRootPath(); | ||
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests'); | ||
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
be_users,,,,,,,,,,,,,,,,, | ||
,uid,pid,tstamp,username,password,admin,disable,starttime,endtime,options,crdate,workspace_perms,deleted,TSconfig,lastlogin,workspace_id,usergroup, | ||
,1,0,1366642540,admin,$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1,1,0,0,0,0,1366642540,1,0,,1371033743,0,, | ||
,2,0,1366642540,editor_no_group,$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1,0,0,0,0,3,1366642540,1,0,,1371033743,0,, | ||
,3,0,1366642540,editor_with_both_groups,$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1,0,0,0,0,3,1366642540,1,0,,1371033743,0,"1,2", | ||
,4,0,1366642540,editor_with_one_group,$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1,0,0,0,0,3,1366642540,1,0,,1371033743,0,"2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pages,,,, | ||
,uid,pid,title,slug, | ||
,1,0,Startpage,/startpage, | ||
tt_content,,,,,, | ||
,uid,pid,header,CType,colPos,tx_container_parent,hidden, | ||
,1,1,Test Container,test-container,0,0,0, | ||
,2,1,Test Child 1,test-child,200,1,0, | ||
,3,1,Test Child 2,test-child,200,1,0, | ||
,4,1,Test Child 3,test-child,200,1,1, |
45 changes: 45 additions & 0 deletions
45
Tests/Functional/EventListener/BeforeContainerConfigurationIsAppliedListenerTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is developed by evoWeb. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Evoweb\EwCollapsibleContainer\Tests\Functional\EventListener; | ||
|
||
use B13\Container\Events\BeforeContainerConfigurationIsAppliedEvent; | ||
use B13\Container\Tca\ContainerConfiguration; | ||
use Evoweb\EwCollapsibleContainer\EventListener\BeforeContainerConfigurationIsAppliedListener; | ||
use PHPUnit\Framework\Attributes\Test; | ||
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; | ||
|
||
class BeforeContainerConfigurationIsAppliedListenerTest extends FunctionalTestCase | ||
{ | ||
protected array $testExtensionsToLoad = [ | ||
'typo3conf/ext/container', | ||
'typo3conf/ext/ew_collapsible_container', | ||
]; | ||
|
||
#[Test] | ||
public function invokeAddsPartial(): void | ||
{ | ||
$fixture = new ContainerConfiguration('a', 'a', 'a', []); | ||
$event = new BeforeContainerConfigurationIsAppliedEvent($fixture); | ||
|
||
$subject = new BeforeContainerConfigurationIsAppliedListener(); | ||
$subject->__invoke($event); | ||
|
||
$this->assertContains( | ||
'EXT:ew_collapsible_container/Resources/Private/Partials/', | ||
$event->getContainerConfiguration()->getGridPartialPaths() | ||
); | ||
} | ||
} |
Oops, something went wrong.