! Published.
All checks were successful
Build the "latest" docker image / build_docker_image (push) Successful in 26s
Build docker image / build_docker_image (push) Successful in 28s

This commit is contained in:
2025-05-03 11:09:41 +02:00
commit 19dea8f983
82 changed files with 14408 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Discord\Builders\Components\Button;
use Monolog\Test\TestCase;
use function Core\messageWithContent;
use function Core\newButton;
class FunctionsTest extends TestCase
{
public function testItCreatesAMessageWithContent(): void
{
$message = messageWithContent('Hello World');
$this->assertEquals([
'content' => 'Hello World',
], $message->jsonSerialize());
}
public function testItCreatesAButton(): void
{
$button = newButton(Button::STYLE_DANGER, 'DANGER');
$this->assertEquals($button->getLabel(), 'DANGER');
$this->assertEquals($button->getStyle(), Button::STYLE_DANGER);
$button = newButton(Button::STYLE_PRIMARY, 'PRIMARY', 'primary_button');
$this->assertEquals($button->getLabel(), 'PRIMARY');
$this->assertEquals($button->getStyle(), Button::STYLE_PRIMARY);
$this->assertEquals($button->getCustomId(), 'primary_button');
}
}