/** * Normalizes gateway $name. * * @param $name * @return string */ public function normalizeGateway($name) { foreach (static::$_gateways as $gateway) { if (Helper::simplify($gateway) === Helper::simplify($name)) { return $gateway; } } return $name; }
public function testSimplify() { $this->assertSame('simpler', Helper::simplify('SimplEr')); $this->assertSame('simpler', Helper::simplify('S im-plEr')); }