/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->updates = new Collection(); $this->multi = new MockMulti(); $this->mock = $this->getWildcardObserver($this->multi); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $that = $this; $this->callables = array('contains' => function ($id, $options = array()) use($that) { return array_key_exists($id, $that->data); }, 'delete' => function ($id, $options = array()) use($that) { unset($that->data[$id]); return true; }, 'fetch' => function ($id, $options = array()) use($that) { return array_key_exists($id, $that->data) ? $that->data[$id] : null; }, 'save' => function ($id, $data, $lifeTime, $options = array()) use($that) { $that->data[$id] = $data; return true; }); $this->adapter = new ClosureCacheAdapter($this->callables); }
protected function setUp() { parent::setUp(); $this->client = $this->getServiceBuilder()->get('test.mixpanel'); $this->mockResponseDir = __DIR__ . '/../../mock/'; }
/** * Setup */ public function setUp() { parent::setUp(); $this->mock = $this->getMockForAbstractClass('Guzzle\\Http\\Message\\AbstractMessage'); }
protected function setUp() { parent::setUp(); $this->client = (new PaymentClientFactory(CredentialsTest::getCredentials()))->factory(); $this->payment = $this->client->createPayment($this->createNewPayment()); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->multi = new MockMulti(); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->cache = StorageFactory::factory(array('adapter' => 'memory')); $this->adapter = new Zf2CacheAdapter($this->cache); }
protected function setUp() { parent::setUp(); $this->multi = new CurlMultiProxy(); }
/** * Prepares the environment before running a test. */ protected function setup() { parent::setUp(); $this->cache = new ArrayCache(); $this->adapter = new DoctrineCacheAdapter($this->cache); }
protected function setUp() { parent::setUp(); $this->multi = new CurlMultiProxy(self::MAX_HANDLES, self::SELECT_TIMEOUT); }
protected function setUp() { parent::setUp(); $this->client = new MyERP('api_email', 'api_key'); }
protected function setUp() { parent::setUp(); $this->client = new Mandrill('api_key'); }
protected function setUp() { parent::setUp(); // the API_KEY value should be set in phpunit.xml $this->client = new Client($_SERVER['API_KEY']); }