diff --git a/tests/NodaUncertaintyHelperTest.php b/tests/NodaUncertaintyHelperTest.php index b7c3ae5..ecafed6 100644 --- a/tests/NodaUncertaintyHelperTest.php +++ b/tests/NodaUncertaintyHelperTest.php @@ -23,8 +23,8 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public function testCleanUncertaintyIndicatorsTime():void { - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsTime("wohl 1950"), "1950"); - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsTime("1950"), "1950"); + self::assertEquals("1950", NodaUncertaintyHelper::cleanUncertaintyIndicatorsTime("wohl 1950")); + self::assertEquals("1950", NodaUncertaintyHelper::cleanUncertaintyIndicatorsTime("1950")); } @@ -38,8 +38,8 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public function testGuessTimeCertainty():void { - self::assertEquals(NodaUncertaintyHelper::guessTimeCertainty("wohl 1950"), false); - self::assertEquals(NodaUncertaintyHelper::guessTimeCertainty("1950"), true); + self::assertFalse(NodaUncertaintyHelper::guessTimeCertainty("wohl 1950")); + self::assertTrue(NodaUncertaintyHelper::guessTimeCertainty("1950")); } @@ -53,8 +53,12 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public static function testCleanUncertaintyIndicatorsPlace():void { - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("wohl Berlin"), "Berlin"); - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("Berlin"), "Berlin"); + self::assertEquals("Berlin", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("wohl Berlin")); + self::assertEquals("Berlin", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("Berlin")); + + // Real-life examples that previously passed unencumbered + self::assertEquals("Augsburg", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("vermutlich: Augsburg")); + self::assertEquals("Augsburg", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPlace("vermutl. Augsburg")); } @@ -68,10 +72,13 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public static function testGuessPlaceCertainty():void { - self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("wohl Berlin"), false); - self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("Berlin"), true); + self::assertFalse(NodaUncertaintyHelper::guessPlaceCertainty("vermutlich: Augsburg")); + self::assertFalse(NodaUncertaintyHelper::guessPlaceCertainty("vermutl. Augsburg")); - self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("?-Italien"), false); + self::assertFalse(NodaUncertaintyHelper::guessPlaceCertainty("wohl Berlin")); + self::assertTrue(NodaUncertaintyHelper::guessPlaceCertainty("Berlin")); + + self::assertFalse(NodaUncertaintyHelper::guessPlaceCertainty("?-Italien")); } @@ -85,9 +92,9 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public static function testCleanUncertaintyIndicatorsPersinst():void { - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("wohl Barbarossa"), "Barbarossa"); - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("Barbarossa"), "Barbarossa"); - self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("?-Barbarossa"), "Barbarossa"); + self::assertEquals("Barbarossa", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("wohl Barbarossa")); + self::assertEquals("Barbarossa", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("Barbarossa")); + self::assertEquals("Barbarossa", NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("?-Barbarossa")); } @@ -101,8 +108,8 @@ final class NodaUncertaintyHelperTest extends TestCase { */ public static function testGuessPersinstCertainty():void { - self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("wohl Barbarossa"), false); - self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("Barbarossa"), true); + self::assertFalse(NodaUncertaintyHelper::guessPlaceCertainty("wohl Barbarossa")); + self::assertTrue(NodaUncertaintyHelper::guessPlaceCertainty("Barbarossa")); } }