public function setUp() { $http = $this->getMockBuilder("\\HttpExchange\\Adapters\\Resty")->disableOriginalConstructor()->getMock(); $http->expects($this->any())->method("get")->will($this->returnSelf()); $http->expects($this->any())->method("getStatusCode")->will($this->onConsecutiveCalls(200, 404)); $http->expects($this->any())->method("getBody")->will($this->returnValue((object) (object) $this->successResponse)); $cache = $this->getMockBuilder("\\CacheExchange\\Cache")->setMethods(array("fetch", "store"))->disableOriginalConstructor()->getMock(); $cache->expects($this->any())->method("fetch")->will($this->onConsecutiveCalls((object) $this->successResponse, false, false)); $cache->expects($this->any())->method("store")->will($this->returnValue(true)); $this->testClass = new \InstaHook\Client($http, $cache, "client_id", "access_token"); parent::setup(); }
public function setUp() { parent::setup(); $_SERVER = array(); }
public function setUp() { parent::setup(); self::$functions = $this->getMockBuilder('stdClass')->setMethods(array('ldap_connect', 'ldap_set_option', 'ldap_bind', 'ldap_search', 'ldap_get_entries'))->getMock(); }
public function setUp() { parent::setup(); self::$functions = $this->getMockBuilder('stdClass')->setMethods(array('setcookie'))->getMock(); }
public function setUp() { parent::setup(); self::$functions = $this->getMockBuilder('stdClass')->setMethods(array('file_put_contents', 'file_get_contents', 'file_exists', 'mkdir', 'is_dir', 'unlink', 'rename', 'move_uploaded_file', 'readfile'))->getMock(); }
public function setUp() { parent::setup(); self::$functions = $this->getMockBuilder('stdClass')->setMethods(array('ldap_search', 'ldap_get_entries'))->getMock(); $this->client = $this->getMockBuilder('\\Kanboard\\Core\\Ldap\\Client')->setMethods(array('getConnection'))->getMock(); }