Support for PHP infection testing
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-11-03 13:29:50 +00:00
parent 66ccb3d8d6
commit bedc666f7c
11 changed files with 115 additions and 30 deletions

View File

@ -42,7 +42,7 @@ final class NtfyTest extends TestCase
public function testSendLong(): void
{
$this->client->expects($this->once())->method('send')->with($this->isInstanceOf(Message::class));
$this->instance->send(str_repeat("t", Ntfy::TOPIC_MAX_LENGTH), str_repeat("t", Ntfy::MESSAGE_MAX_LENGTH));
$this->instance->send(str_repeat("t", Ntfy::TITLE_MAX_LENGTH), str_repeat("t", Ntfy::MESSAGE_MAX_LENGTH));
}
/** @return array<int, array<int, string>> */
@ -52,8 +52,8 @@ final class NtfyTest extends TestCase
['', ''],
['', 'text'],
['title', ''],
[str_repeat("t", Ntfy::TOPIC_MAX_LENGTH+1),'text'],
['title',str_repeat("t", Ntfy::MESSAGE_MAX_LENGTH+1)],
[str_repeat("t", Ntfy::TITLE_MAX_LENGTH + 1), 'text'],
['title',str_repeat("t", Ntfy::MESSAGE_MAX_LENGTH + 1)],
];
}
@ -80,8 +80,7 @@ final class NtfyTest extends TestCase
{
return [
[''],
[str_repeat("t", Ntfy::TOPIC_MAX_LENGTH+1)],
[str_repeat("t", Ntfy::MESSAGE_MAX_LENGTH+1)],
[str_repeat("t", Ntfy::TOPIC_MAX_LENGTH + 1)],
];
}