本文整理汇总了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();
}