test(helpdesk): add OData injection rejection tests and meetings cache key coverage

Adds 11 tests for BcODataGateway covering getMeetingsForCustomer (empty,
whitespace, not-configured), OData injection rejection for all customerNo
methods (meetings, contract lines, escalation tickets, controlling), and
valid input acceptance. Also adds meetingsKey format and inclusion tests
for DebitorCacheControl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 15:16:57 +02:00
parent a0cb345e04
commit 3827b09205
2 changed files with 110 additions and 0 deletions

View File

@@ -71,4 +71,16 @@ class DebitorCacheControlTest extends TestCase
$keys = DebitorCacheControl::allDebitorCacheKeys('7', '10610');
$this->assertContains('module.helpdesk.debitor.v2.controlling-tickets.7.10610', $keys);
}
public function testMeetingsKeyFormat(): void
{
$key = DebitorCacheControl::meetingsKey('3', '10254');
$this->assertSame('module.helpdesk.debitor.v2.meetings.3.10254', $key);
}
public function testAllDebitorCacheKeysIncludesMeetingsKey(): void
{
$keys = DebitorCacheControl::allDebitorCacheKeys('3', '10254');
$this->assertContains('module.helpdesk.debitor.v2.meetings.3.10254', $keys);
}
}