/** * @return Driver */ protected function _getClient() { if (class_exists('\\GuzzleHttp\\Client') && (version_compare(Env::getVersion(), '5.3', '>') || Env::isHHVM())) { if (method_exists('\\GuzzleHttp\\Client', 'request')) { $client = new Guzzle6(); } elseif (method_exists('\\GuzzleHttp\\Client', 'createRequest')) { $client = new Guzzle5(); } } if (!isset($client)) { // Fallback driver $client = new Rmccue(); } return $client; }
/** * @covers JBZoo\Utils\Env::getVersion * @uses JBZoo\Utils\Env::isHHVM */ public function testVersionCanBeRetrieved() { $this->assertInternalType('string', Env::getVersion()); }