public static function getBaseRoute($path) { if (StringHandler::endsWith($path, "Locale")) { $path = StringHandler::replaceLast("Locale", "", $path); } return $path; }
/** * @dataProvider replaceLastProvider */ public function testReplaceLast($input, $wanted, $expected) { $this->assertEquals($expected, StringHandler::replaceLast($wanted, "", $input)); }