protected function createDriver($parameters) { $driver = parent::createDriver($parameters); $driverName = strtolower($parameters['driver']); if (StringUtils::startsWith($driverName, 'pdo_')) { $driverName = substr($driverName, 4); } $this->driverName = $driverName; return $driver; }
public function testStartsWith() { $string = 'john_mcclane'; $this->assertTrue(StringUtils::startsWith($string, 'john')); $this->assertFalse(StringUtils::startsWith($string, 'mcclane')); }