diff --git a/.gitignore b/.gitignore index 5efee1a..1fc94c6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,9 @@ nbproject composer.lock .php_cs.cache var -.cache \ No newline at end of file +# PHPUnit Reports +Tests/reports +reports +.cache +.phpunit.cache +.phpunit.result.cache \ No newline at end of file diff --git a/Classes/Controller/BackendModuleController.php b/Classes/Controller/BackendModuleController.php index 23354c5..d6af637 100644 --- a/Classes/Controller/BackendModuleController.php +++ b/Classes/Controller/BackendModuleController.php @@ -50,7 +50,7 @@ class BackendModuleController extends ActionController /** * @var ModuleTemplateFactory */ - protected ModuleTemplateFactory $moduleTemplateFactory; + public $moduleTemplateFactory; /** * BackendTemplateContainer @@ -62,7 +62,7 @@ class BackendModuleController extends ActionController /** * @var CacheManager */ - private $cacheManager; + private object $cacheManager; /** * @var LanguageService diff --git a/README.md b/README.md index c990e99..31cbb70 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ And then open `Documentation-GENERATED-temp/Result/project/0.0.0/Index.html` wit ## Copyright / License -Copyright: (c) 2009 - 2019, Kasper Skaarhoj & AOE GmbH +Copyright: (c) 2009 - 2024, Kasper Skaarhoj & AOE GmbH License: GPLv3, [1]: http://typo3.org/extensions/repository/view/cachemgm diff --git a/Tests/Functional/Domain/Repository/CacheTableRepositoryTest.php b/Tests/Functional/Domain/Repository/CacheTableRepositoryTest.php index cc0edf5..6807b98 100644 --- a/Tests/Functional/Domain/Repository/CacheTableRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/CacheTableRepositoryTest.php @@ -63,7 +63,7 @@ protected function setUp(): void public function testCountRowsInTable(): void { - $this->importDataSet(__DIR__ . '/Fixtures/cache_pages.xml'); + $this->importCSVDataSet(__DIR__ . '/Fixtures/cache_pages.csv'); $this->assertSame( 2, $this->subject->countRowsInTable('cache_pages') diff --git a/Tests/Functional/Domain/Repository/Fixtures/cache_pages.csv b/Tests/Functional/Domain/Repository/Fixtures/cache_pages.csv new file mode 100644 index 0000000..d5b46d3 --- /dev/null +++ b/Tests/Functional/Domain/Repository/Fixtures/cache_pages.csv @@ -0,0 +1,4 @@ +cache_pages,,, +,id,identifier,content +,1,c4355df29142213662c0561fe304de25,this-is-a-string-in-md5 +,2,f9982c771f6d32fe6830b4b3c2ef646a,this-is-another-string-in-md5 diff --git a/Tests/Functional/Domain/Repository/Fixtures/cache_pages.xml b/Tests/Functional/Domain/Repository/Fixtures/cache_pages.xml deleted file mode 100644 index 0ed4805..0000000 --- a/Tests/Functional/Domain/Repository/Fixtures/cache_pages.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - 1 - c4355df29142213662c0561fe304de25 - this-is-a-string-in-md5 - - - 2 - f9982c771f6d32fe6830b4b3c2ef646a - this-is-another-string-in-md5 - - diff --git a/Tests/Functional/FunctionalTests.xml b/Tests/Functional/FunctionalTests.xml new file mode 100644 index 0000000..a195b28 --- /dev/null +++ b/Tests/Functional/FunctionalTests.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + ../../Classes + + + diff --git a/Tests/Unit/UnitTests.xml b/Tests/Unit/UnitTests.xml new file mode 100644 index 0000000..5ce94ed --- /dev/null +++ b/Tests/Unit/UnitTests.xml @@ -0,0 +1,25 @@ + + + + + ../Classes + + + diff --git a/code-quality/rector.php b/code-quality/rector.php index 870b6cc..95da72c 100644 --- a/code-quality/rector.php +++ b/code-quality/rector.php @@ -70,14 +70,8 @@ ]) ->withSkip([ RecastingRemovalRector::class, - PostIncDecToPreIncDecRector::class, - FinalizeClassesWithoutChildrenRector::class, - ChangeAndIfToEarlyReturnRector::class, IssetOnPropertyObjectToPropertyExistsRector::class, FlipTypeControlToUseExclusiveTypeRector::class, - RenameVariableToMatchNewTypeRector::class, - AddLiteralSeparatorToNumberRector::class, - RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class, ClassPropertyAssignToConstructorPromotionRector::class => [ __DIR__ . '/../Classes/Service/Typo3Service.php', ],// @todo strict php diff --git a/composer.json b/composer.json index 9b83734..b9ac069 100644 --- a/composer.json +++ b/composer.json @@ -57,11 +57,11 @@ ], "test:unit": [ "[ -e .Build/bin/phpunit ] || composer update", - "TYPO3_PATH_WEB=$PWD/.Build/Web .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests-v10.xml Tests/Unit" + "XDEBUG_MODE=coverage TYPO3_PATH_WEB=$PWD/.Build/Web .Build/bin/phpunit -c Tests/Unit/UnitTests.xml Tests/Unit" ], "test:functional": [ "[ -e .Build/bin/phpunit ] || composer update", - "TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseName=cachemgm typo3DatabaseHost=127.0.0.1 typo3DatabaseUsername=root typo3DatabasePassword=root .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests-v10.xml Tests/Functional/" + "XDEBUG_MODE=coverage TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseName=cachemgm typo3DatabaseHost=127.0.0.1 typo3DatabaseUsername=root typo3DatabasePassword=root .Build/bin/phpunit -c Tests/Functional/FunctionalTests.xml Tests/Functional/" ], "test:all": [ "@test:unit",