本文整理汇总了PHP中WP_Mock::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_Mock::tearDown方法的具体用法?PHP WP_Mock::tearDown怎么用?PHP WP_Mock::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_Mock
的用法示例。
在下文中一共展示了WP_Mock::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public static function tearDown()
{
if (self::$type === HookMock::WP_MOCK) {
\WP_Mock::tearDown();
}
self::$type = null;
}
示例2: tearDown
public function tearDown()
{
\WP_Mock::tearDown();
$cls = new ReflectionClass(\Dxw\Iguana\Registrar::class);
$property = $cls->getProperty('singleton');
$property->setAccessible(true);
$property->setValue(null);
}
示例3: tearDown
function tearDown()
{
parent::tearDown();
WP_Mock::tearDown();
unset($this->product_factory);
unset($this->key_factory);
unset($this->activation_factory);
unset($this->release_factory);
unset($this->update_factory);
}
示例4: make_request
private function make_request()
{
$url = 'http://acme.org/new-authz';
$response = MockData::get_head_response();
\WP_Mock::setUp();
// Mock the remote request
\WP_Mock::wpFunction('wp_remote_request', array('args' => array($url, array('body' => '')), 'times' => 1, 'return' => $response));
$nonce = new \LEWP\Request\Nonce($url);
$nonce->send();
\WP_Mock::tearDown();
return $nonce;
}
示例5: get_directory_object
private function get_directory_object()
{
$url = 'http://acme.org/directory';
$args = array('body' => '');
$response = MockData::get_directory_response();
\WP_Mock::setUp();
// Mock the remote request
\WP_Mock::wpFunction('wp_remote_request', array('args' => array($url, $args), 'times' => 1, 'return' => $response));
$directory = new \LEWP\Request\Directory($url);
$directory->send();
\WP_Mock::tearDown();
return $directory;
}
示例6: test_send_generates_response_and_sets_properties
public function test_send_generates_response_and_sets_properties()
{
$url = 'http://acme.org/directory';
$args = array('body' => '');
$response = MockData::get_directory_response();
\WP_Mock::setUp();
// Mock the remote request
\WP_Mock::wpFunction('wp_remote_request', array('args' => array($url, $args), 'times' => 1, 'return' => $response));
$directory = new \LEWP\Request\Directory($url);
$this->assertEquals($response, $directory->send());
$this->assertEquals($response, $directory->get_response());
$this->assertEquals($response['body'], $directory->get_body());
$this->assertEquals($response['headers']['replay-nonce'], $directory->get_response_nonce());
\WP_Mock::tearDown();
}
示例7: tearDown
protected function tearDown()
{
\WP_Mock::tearDown();
}
示例8: tearDown
public function tearDown()
{
WP::tearDown();
}
示例9: tearDown
/**
* @return null
*/
public function tearDown()
{
WP_Mock::tearDown();
Mockery::close();
}
示例10: tearDown
public function tearDown()
{
WP::tearDown();
unset($this->plugin);
}
示例11: tearDown
function tearDown()
{
\WP_Mock::tearDown();
parent::tearDown();
}
示例12: tearDown
function tearDown()
{
global $WPCF7_Submission_mock;
\WP_Mock::tearDown();
$WPCF7_Submission_mock = null;
}
示例13: tearDown
/**
* Clean up after the test is run
*/
function tearDown()
{
\WP_Mock::tearDown();
unset($this->instance);
}
示例14: tearDown
public function tearDown()
{
\WP_Mock::tearDown();
}
示例15: tearDown
public function tearDown()
{
\WP_Mock::tearDown();
\Dxw\Iguana\Theme\Layout::$wordpress_template = null;
\Dxw\Iguana\Theme\Layout::$base = null;
}