Teilnahmerechnungen erstellen

This commit is contained in:
2026-09-03 00:08:46 +02:00
parent a61344395a
commit 9c4c28e566
79 changed files with 4303 additions and 75 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Tests\Unit;
use App\Support\Text;
use PHPUnit\Framework\TestCase;
class TextTest extends TestCase
{
public function test_blank_input_becomes_null(): void
{
// Optionale Formularfelder kommen als Leerstring an, nicht als null.
$this->assertNull(Text::nullIfBlank(null));
$this->assertNull(Text::nullIfBlank(''));
$this->assertNull(Text::nullIfBlank(' '));
$this->assertNull(Text::nullIfBlank("\t\n"));
}
public function test_content_is_kept_and_trimmed(): void
{
$this->assertSame('Musterweg 1', Text::nullIfBlank(' Musterweg 1 '));
$this->assertSame('WM', Text::nullIfBlank('WM'));
}
public function test_a_zero_is_content_not_emptiness(): void
{
// "0" ist falsy -- eine naive Prüfung mit `empty()` würde die Angabe verschlucken.
$this->assertSame('0', Text::nullIfBlank('0'));
}
}