assertSame([], array_values(array_diff($offered, $files)), 'Jede Auswahl braucht eine vorhandene Datei.'); $this->assertSame(['gelbe-unterstreichung', 'signalstrahlen'], array_values(array_diff($files, $offered)), 'Unterstreichung und Strahlen haben eigene Einstellungen.'); } public function test_labels_are_present_for_every_symbol(): void { foreach (HeadingAccent::SYMBOLS as $name => $label) { $this->assertNotSame('', trim($label), $name); } } public function test_only_known_names_are_accepted(): void { $this->assertSame('buch', HeadingAccent::symbol(['symbol' => 'buch'])); $this->assertNull(HeadingAccent::symbol([])); $this->assertNull(HeadingAccent::symbol(['symbol' => ''])); $this->assertNull(HeadingAccent::symbol(['symbol' => '../../.env'])); $this->assertNull(HeadingAccent::symbol(['symbol' => 'signalstrahlen'])); $this->assertNull(HeadingAccent::symbol(['symbol' => ['buch']])); } public function test_large_needs_a_valid_symbol_and_the_exact_value(): void { $this->assertTrue(HeadingAccent::isLarge(['symbol' => 'buch', 'symbol_size' => 'large'])); $this->assertFalse(HeadingAccent::isLarge(['symbol_size' => 'large'])); $this->assertFalse(HeadingAccent::isLarge(['symbol' => 'nicht-vorhanden', 'symbol_size' => 'large'])); $this->assertFalse(HeadingAccent::isLarge(['symbol' => 'buch'])); $this->assertFalse(HeadingAccent::isLarge(['symbol' => 'buch', 'symbol_size' => 'huge'])); } public function test_the_link_style_falls_back_to_the_text_link(): void { $this->assertSame('pill', HeadingAccent::linkStyle(['link_style' => 'pill'])); $this->assertSame('text', HeadingAccent::linkStyle([])); $this->assertSame('text', HeadingAccent::linkStyle(['link_style' => 'button'])); } public function test_the_brush_needs_the_exact_value(): void { $this->assertTrue(HeadingAccent::hasBrush(['accent' => 'brush'])); $this->assertFalse(HeadingAccent::hasBrush(['accent' => 'rays'])); $this->assertFalse(HeadingAccent::hasBrush([])); } }