/** * Returns currently used SOAP library hook. * * If no library hook is set, a new one is created. * * @return SoapHook SOAP library hook. */ protected function getLibraryHook() { if (empty($this->soapHook)) { $this->soapHook = VCRFactory::get('VCR\\LibraryHooks\\SoapHook'); } return $this->soapHook; }
/** * @dataProvider storageProvider */ public function testCreateStorage($storage, $className) { vfsStream::setup('test'); VCRFactory::get('VCR\\Configuration')->setStorage($storage); VCRFactory::get('VCR\\Configuration')->setCassettePath(vfsStream::url('test/')); $instance = VCRFactory::get('Storage', array(rand())); $this->assertInstanceOf($className, $instance); }