From c8ed4040a2426b1c85dc345ff889d4d615007538 Mon Sep 17 00:00:00 2001 From: Clemens Krack Date: Thu, 16 Jul 2020 17:29:43 +0200 Subject: [PATCH] tests: test for punctuation/whitespace in Anagram --- tests/Anagram/AnagramTest.php | 12 ++++++++++++ tests/Anagram/Complete/AnagramCompleteTest.php | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/tests/Anagram/AnagramTest.php b/tests/Anagram/AnagramTest.php index bb7e759..55c76a9 100644 --- a/tests/Anagram/AnagramTest.php +++ b/tests/Anagram/AnagramTest.php @@ -36,4 +36,16 @@ public function testCanCheckString3(): void self::markTestSkipped(); self::assertFalse(Anagram::check('roast beef', 'goat roast')); } + + public function testCanCheckStringPunctuation(): void + { + self::markTestSkipped(); + self::assertTrue(Anagram::check('Elv.is', 'lives')); + } + + public function testCanCheckStringWhitespace(): void + { + self::markTestSkipped(); + self::assertTrue(Anagram::check('El vis', 'lives')); + } } diff --git a/tests/Anagram/Complete/AnagramCompleteTest.php b/tests/Anagram/Complete/AnagramCompleteTest.php index b9b9208..a37cae0 100644 --- a/tests/Anagram/Complete/AnagramCompleteTest.php +++ b/tests/Anagram/Complete/AnagramCompleteTest.php @@ -23,4 +23,14 @@ public function testCanCheckString3(): void { self::assertFalse(AnagramComplete::check('roast beef', 'goat roast')); } + + public function testCanCheckStringPunctuation(): void + { + self::assertTrue(AnagramComplete::check('Elv.is', 'lives')); + } + + public function testCanCheckStringWhitespace(): void + { + self::assertTrue(AnagramComplete::check('El vis', 'lives')); + } }