Skip to content

Commit da039ea

Browse files
committed
[TASK] Fix code style issues, update ChangeLog
1 parent f18495f commit da039ea

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

‎ChangeLog‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ Upcoming version
44
[!!!] Clear the caches after updating because there were updates in injected dependencies
55
[TASK] Add null coalescing for file_collections in File indexer. Thanks to mcmietz. https://github.com/tpwd/ke_search/issues/315
66
[TASK] Refactor addTagsToRecords for improved readability and maintainability. https://github.com/tpwd/ke_search/issues/238
7-
[TASK] Update PHPUnit to version 11
87
[TASK] Update TCA definitions for TYPO3 13
8+
[TASK] Update PHPUnit to version 11
9+
[TASK] Introduce functional tests for TaggingService
910

1011
Version 7.0.0, 18 December 2025
1112
[!!!] This version drops support for TYPO3 12

‎Tests/Functional/Service/TaggingServiceTest.php‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setUp(): void
2424

2525
public function testAddTagsToPageRecordsWithPageProperties(): void
2626
{
27-
$this->markTestSkipped('FIND_IN_SET is not supported in SQLite');
27+
self::markTestSkipped('FIND_IN_SET is not supported in SQLite');
2828
}
2929

3030
public function testAddTagsToPageRecordsWithAutomatedTagging(): void
@@ -46,9 +46,9 @@ public function testAddTagsToPageRecordsWithAutomatedTagging(): void
4646

4747
// Expect calls for tag3 (PID 10)
4848
// Note: TaggingService calls getTreeList for each PID in automated_tagging
49-
$treeServiceMock->expects($this->any())
49+
$treeServiceMock->expects(self::any())
5050
->method('getTreeList')
51-
->willReturnCallback(function($pid, $depth, $begin, $where) {
51+
->willReturnCallback(function ($pid, $depth, $begin, $where) {
5252
if ($pid == 10) {
5353
if (str_contains($where, 'NOT IN (12)')) {
5454
return '10,11';
@@ -70,21 +70,21 @@ public function testAddTagsToPageRecordsWithAutomatedTagging(): void
7070
$result = $method->invoke($this->subject, $pageRecords, $tagChar);
7171

7272
// tag3 is automated for PID 10 and its children (10, 11, 12)
73-
$this->assertStringContainsString('#tag3#', $result[10]['tags']);
74-
$this->assertStringContainsString('#tag3#', $result[11]['tags']);
75-
$this->assertStringContainsString('#tag3#', $result[12]['tags']);
76-
$this->assertStringNotContainsString('#tag3#', $result[20]['tags']);
73+
self::assertStringContainsString('#tag3#', $result[10]['tags']);
74+
self::assertStringContainsString('#tag3#', $result[11]['tags']);
75+
self::assertStringContainsString('#tag3#', $result[12]['tags']);
76+
self::assertStringNotContainsString('#tag3#', $result[20]['tags']);
7777

7878
// tag4 is automated for PID 10 and its children, but excludes PID 12
79-
$this->assertStringContainsString('#tag4#', $result[10]['tags']);
80-
$this->assertStringContainsString('#tag4#', $result[11]['tags']);
81-
$this->assertStringNotContainsString('#tag4#', $result[12]['tags']);
79+
self::assertStringContainsString('#tag4#', $result[10]['tags']);
80+
self::assertStringContainsString('#tag4#', $result[11]['tags']);
81+
self::assertStringNotContainsString('#tag4#', $result[12]['tags']);
8282
}
8383

8484
public function testAddTagsToPageRecordsEmptyUids(): void
8585
{
8686
$pageRecords = [10 => ['uid' => 10, 'tags' => '']];
8787
$result = $this->subject->addTagsToPageRecords($pageRecords, [], '#');
88-
$this->assertEquals($pageRecords, $result);
88+
self::assertEquals($pageRecords, $result);
8989
}
9090
}

0 commit comments

Comments
 (0)