From c106703abe96071276f1548bedfed195cb69fbaf Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 8 Oct 2024 15:07:02 +0200 Subject: [PATCH] [TASK] Cleanup tests (#1514) --- Tests/Functional/Parser/ScssParserTest.php | 25 ++++++++----------- .../AccordionContentElementUpdateTest.php | 9 +++---- .../AccordionMediaOrientUpdateTest.php | 9 +++---- .../Updates/BackendLayoutUpdateTest.php | 9 +++---- .../BulletContentElementUpdateTest.php | 9 +++---- .../CarouselContentElementUpdateTest.php | 9 +++---- .../Updates/CarouselItemLayoutUpdateTest.php | 9 +++---- .../Updates/CarouselItemTypeUpdateTest.php | 9 +++---- .../ExternalMediaContentElementUpdateTest.php | 9 +++---- .../FrameClassToBackgroundUpdateTest.php | 9 +++---- .../Updates/FrameClassToOptionsUpdateTest.php | 9 +++---- .../Updates/FrameClassUpdateTest.php | 9 +++---- .../ListGroupContentElementUpdateTest.php | 9 +++---- .../Updates/PanelContentElementUpdateTest.php | 9 +++---- .../Updates/TabContentElementUpdateTest.php | 9 +++---- .../Updates/TabMediaOrientUpdateTest.php | 9 +++---- .../Updates/TableContentElementUpdateTest.php | 9 +++---- .../TexticonContentElementUpdateTest.php | 9 +++---- .../Updates/TexticonIconUpdateTest.php | 9 +++---- .../Updates/TexticonSizeUpdateTest.php | 9 +++---- .../Updates/TexticonTypeUpdateTest.php | 9 +++---- 21 files changed, 71 insertions(+), 134 deletions(-) diff --git a/Tests/Functional/Parser/ScssParserTest.php b/Tests/Functional/Parser/ScssParserTest.php index 0d68bbf80..1b8e86fa6 100644 --- a/Tests/Functional/Parser/ScssParserTest.php +++ b/Tests/Functional/Parser/ScssParserTest.php @@ -10,6 +10,8 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Parser; use BK2K\BootstrapPackage\Service\CompileService; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\ExpectationFailedException; use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\EventDispatcher\NoopEventDispatcher; @@ -55,10 +57,8 @@ protected static function assertFileContains(string $filename, string $needle): } } - /** - * @test - * @dataProvider scssParserCanCompileTestDataProvider - */ + #[DataProvider('scssParserCanCompileTestDataProvider')] + #[Test] public function scssParserCanCompileTest(string $inputFile): void { $request = $this->buildRequest(); @@ -83,9 +83,7 @@ public static function scssParserCanCompileTestDataProvider(): array ]; } - /** - * @test - */ + #[Test] public function urlsAreRelativeToTempTest(): void { $request = $this->buildRequest(); @@ -98,15 +96,13 @@ public function urlsAreRelativeToTempTest(): void ); } - /** - * @test - * @dataProvider scssParserCanCompileTestDataProvider - */ - public function sourceMapsAreIncluded(string $file): void + #[DataProvider('scssParserCanCompileTestDataProvider')] + #[Test] + public function sourceMapsAreIncluded(string $inputFile): void { $request = $this->buildRequest('plugin.tx_bootstrappackage.settings.cssSourceMapping = 1'); $compileService = GeneralUtility::makeInstance(CompileService::class); - $compiledFile = $compileService->getCompiledFile($request, $file); + $compiledFile = $compileService->getCompiledFile($request, $inputFile); $mapFile = $compiledFile . '.map'; self::assertFileExists(Environment::getPublicPath() . '/' . $mapFile); @@ -118,7 +114,8 @@ protected function buildRequest(string $typoScriptString = ''): ServerRequest $request = new ServerRequest(); $lineStream = (new LossyTokenizer())->tokenize($typoScriptString); $typoScriptAst = (new AstBuilder(new NoopEventDispatcher()))->build($lineStream, new RootNode()); - $typoScriptAttribute = new FrontendTypoScript(new RootNode(), []); + /** @phpstan-ignore-next-line */ + $typoScriptAttribute = new FrontendTypoScript(new RootNode(), [], [], []); $typoScriptAttribute->setSetupTree($typoScriptAst); $typoScriptAttribute->setSetupArray($typoScriptAst->toArray()); $request = $request->withAttribute('frontend.typoscript', $typoScriptAttribute); diff --git a/Tests/Functional/Updates/AccordionContentElementUpdateTest.php b/Tests/Functional/Updates/AccordionContentElementUpdateTest.php index 588f89eab..4131a550e 100644 --- a/Tests/Functional/Updates/AccordionContentElementUpdateTest.php +++ b/Tests/Functional/Updates/AccordionContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\AccordionContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class AccordionContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new AccordionContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new AccordionContentElementUpdate(); diff --git a/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php b/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php index 7239e1c37..555f95e2e 100644 --- a/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php +++ b/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\AccordionMediaOrientUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class AccordionMediaOrientUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new AccordionMediaOrientUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new AccordionMediaOrientUpdate(); diff --git a/Tests/Functional/Updates/BackendLayoutUpdateTest.php b/Tests/Functional/Updates/BackendLayoutUpdateTest.php index 4b7af4cb4..86213e4b8 100644 --- a/Tests/Functional/Updates/BackendLayoutUpdateTest.php +++ b/Tests/Functional/Updates/BackendLayoutUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\BackendLayoutUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class BackendLayoutUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new BackendLayoutUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new BackendLayoutUpdate(); diff --git a/Tests/Functional/Updates/BulletContentElementUpdateTest.php b/Tests/Functional/Updates/BulletContentElementUpdateTest.php index 477f4a466..76115d57f 100644 --- a/Tests/Functional/Updates/BulletContentElementUpdateTest.php +++ b/Tests/Functional/Updates/BulletContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\BulletContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class BulletContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new BulletContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new BulletContentElementUpdate(); diff --git a/Tests/Functional/Updates/CarouselContentElementUpdateTest.php b/Tests/Functional/Updates/CarouselContentElementUpdateTest.php index 7c04676a1..fe654c787 100644 --- a/Tests/Functional/Updates/CarouselContentElementUpdateTest.php +++ b/Tests/Functional/Updates/CarouselContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\CarouselContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class CarouselContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new CarouselContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new CarouselContentElementUpdate(); diff --git a/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php b/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php index e1767b86b..53e02b384 100644 --- a/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php +++ b/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\CarouselItemLayoutUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class CarouselItemLayoutUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new CarouselItemLayoutUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new CarouselItemLayoutUpdate(); diff --git a/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php b/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php index 767cc2830..1ef85bfc7 100644 --- a/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php +++ b/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\CarouselItemTypeUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class CarouselItemTypeUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new CarouselItemTypeUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new CarouselItemTypeUpdate(); diff --git a/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php b/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php index fb02154f4..fb690ba44 100644 --- a/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php +++ b/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\ExternalMediaContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class ExternalMediaContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new ExternalMediaContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new ExternalMediaContentElementUpdate(); diff --git a/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php b/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php index 6b7634306..bfd1925f1 100644 --- a/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php +++ b/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\FrameClassToBackgroundUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class FrameClassToBackgroundUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new FrameClassToBackgroundUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new FrameClassToBackgroundUpdate(); diff --git a/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php b/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php index 7b16b785a..a14de33d6 100644 --- a/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php +++ b/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\FrameClassToOptionsUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class FrameClassToOptionsUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new FrameClassToOptionsUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new FrameClassToOptionsUpdate(); diff --git a/Tests/Functional/Updates/FrameClassUpdateTest.php b/Tests/Functional/Updates/FrameClassUpdateTest.php index d19cf5df7..0f940fcd5 100644 --- a/Tests/Functional/Updates/FrameClassUpdateTest.php +++ b/Tests/Functional/Updates/FrameClassUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\FrameClassUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; @@ -30,18 +31,14 @@ final class FrameClassUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new FrameClassUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content'); diff --git a/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php b/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php index 925bbb9a7..c204b8610 100644 --- a/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php +++ b/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\ListGroupContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class ListGroupContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new ListGroupContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new ListGroupContentElementUpdate(); diff --git a/Tests/Functional/Updates/PanelContentElementUpdateTest.php b/Tests/Functional/Updates/PanelContentElementUpdateTest.php index 0a3f78e2a..3fcad84a8 100644 --- a/Tests/Functional/Updates/PanelContentElementUpdateTest.php +++ b/Tests/Functional/Updates/PanelContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\PanelContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class PanelContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new PanelContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new PanelContentElementUpdate(); diff --git a/Tests/Functional/Updates/TabContentElementUpdateTest.php b/Tests/Functional/Updates/TabContentElementUpdateTest.php index 546cf3a60..342a351bf 100644 --- a/Tests/Functional/Updates/TabContentElementUpdateTest.php +++ b/Tests/Functional/Updates/TabContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TabContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TabContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TabContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TabContentElementUpdate(); diff --git a/Tests/Functional/Updates/TabMediaOrientUpdateTest.php b/Tests/Functional/Updates/TabMediaOrientUpdateTest.php index 48df643b8..a676a0155 100644 --- a/Tests/Functional/Updates/TabMediaOrientUpdateTest.php +++ b/Tests/Functional/Updates/TabMediaOrientUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TabMediaOrientUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TabMediaOrientUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TabMediaOrientUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TabMediaOrientUpdate(); diff --git a/Tests/Functional/Updates/TableContentElementUpdateTest.php b/Tests/Functional/Updates/TableContentElementUpdateTest.php index 16f4e536d..965ed23b1 100644 --- a/Tests/Functional/Updates/TableContentElementUpdateTest.php +++ b/Tests/Functional/Updates/TableContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TableContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TableContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TableContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TableContentElementUpdate(); diff --git a/Tests/Functional/Updates/TexticonContentElementUpdateTest.php b/Tests/Functional/Updates/TexticonContentElementUpdateTest.php index 069e40d4f..a3a2b5c7c 100644 --- a/Tests/Functional/Updates/TexticonContentElementUpdateTest.php +++ b/Tests/Functional/Updates/TexticonContentElementUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TexticonContentElementUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TexticonContentElementUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TexticonContentElementUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TexticonContentElementUpdate(); diff --git a/Tests/Functional/Updates/TexticonIconUpdateTest.php b/Tests/Functional/Updates/TexticonIconUpdateTest.php index fdd5445cd..8eb24ea3c 100644 --- a/Tests/Functional/Updates/TexticonIconUpdateTest.php +++ b/Tests/Functional/Updates/TexticonIconUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TexticonIconUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TexticonIconUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TexticonIconUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TexticonIconUpdate(); diff --git a/Tests/Functional/Updates/TexticonSizeUpdateTest.php b/Tests/Functional/Updates/TexticonSizeUpdateTest.php index ecb28a317..9272183fe 100644 --- a/Tests/Functional/Updates/TexticonSizeUpdateTest.php +++ b/Tests/Functional/Updates/TexticonSizeUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TexticonSizeUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TexticonSizeUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TexticonSizeUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TexticonSizeUpdate(); diff --git a/Tests/Functional/Updates/TexticonTypeUpdateTest.php b/Tests/Functional/Updates/TexticonTypeUpdateTest.php index 44843f81a..058f418a2 100644 --- a/Tests/Functional/Updates/TexticonTypeUpdateTest.php +++ b/Tests/Functional/Updates/TexticonTypeUpdateTest.php @@ -12,6 +12,7 @@ namespace BK2K\BootstrapPackage\Tests\Functional\Updates; use BK2K\BootstrapPackage\Updates\TexticonTypeUpdate; +use PHPUnit\Framework\Attributes\Test; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -28,18 +29,14 @@ final class TexticonTypeUpdateTest extends FunctionalTestCase 'typo3conf/ext/bootstrap_package' ]; - /** - * @test - */ + #[Test] public function noUpdateNecessaryTest(): void { $subject = new TexticonTypeUpdate(); self::assertFalse($subject->updateNecessary()); } - /** - * @test - */ + #[Test] public function updateTest(): void { $subject = new TexticonTypeUpdate();