本文整理匯總了PHP中Base::setup方法的典型用法代碼示例。如果您正苦於以下問題:PHP Base::setup方法的具體用法?PHP Base::setup怎麽用?PHP Base::setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Base
的用法示例。
在下文中一共展示了Base::setup方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUp
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();
}
示例2: setUp
public function setUp()
{
parent::setup();
$_SERVER = array();
}
示例3: setUp
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();
}
示例4: setUp
public function setUp()
{
parent::setup();
self::$functions = $this->getMockBuilder('stdClass')->setMethods(array('setcookie'))->getMock();
}
示例5: setUp
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();
}
示例6: setUp
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();
}