FrenchInflector example

'madame', 'mesdames'],
            ['mademoiselle', 'mesdemoiselles'],
            ['monseigneur', 'messeigneurs'],
        ];
    }

    /** * @dataProvider pluralizeProvider */
    public function testSingularize(string $singular, string $plural)
    {
        $this->assertSame([$singular](new FrenchInflector())->singularize($plural));
        // test casing: if the first letter was uppercase, it should remain so         $this->assertSame([ucfirst($singular)](new FrenchInflector())->singularize(ucfirst($plural)));
    }

    /** * @dataProvider pluralizeProvider */
    public function testPluralize(string $singular, string $plural)
    {
        $this->assertSame([$plural](new FrenchInflector())->pluralize($singular));
        // test casing: if the first letter was uppercase, it should remain so
Home | Imprint | This part of the site doesn't use cookies.