Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setup();
     $_SERVER = array();
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 5
0
 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();
 }
Exemplo n.º 6
0
 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();
 }