当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_Mock::tearDown方法代码示例

本文整理汇总了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;
 }
开发者ID:versionpress,项目名称:versionpress,代码行数:7,代码来源:HookMock.php

示例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);
 }
开发者ID:dxw,项目名称:iguana,代码行数:8,代码来源:registrar_test.php

示例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);
 }
开发者ID:pemiu01,项目名称:exchange-addon-licensing,代码行数:10,代码来源:test-case.php

示例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;
 }
开发者ID:kraftbj,项目名称:lets-encrypt-wp,代码行数:12,代码来源:NonceTest.php

示例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;
 }
开发者ID:kraftbj,项目名称:lets-encrypt-wp,代码行数:13,代码来源:ResourcesTest.php

示例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();
 }
开发者ID:kraftbj,项目名称:lets-encrypt-wp,代码行数:15,代码来源:DirectoryTest.php

示例7: tearDown

 protected function tearDown()
 {
     \WP_Mock::tearDown();
 }
开发者ID:nocttuam,项目名称:lyric,代码行数:4,代码来源:submenu-builder-Test.php

示例8: tearDown

 public function tearDown()
 {
     WP::tearDown();
 }
开发者ID:acobster,项目名称:wp-custom-field-traits,代码行数:4,代码来源:Field_AbstractBaseTest.php

示例9: tearDown

 /**
  * @return null
  */
 public function tearDown()
 {
     WP_Mock::tearDown();
     Mockery::close();
 }
开发者ID:sumi21japan,项目名称:wordpress-plus,代码行数:8,代码来源:TestCase.php

示例10: tearDown

 public function tearDown()
 {
     WP::tearDown();
     unset($this->plugin);
 }
开发者ID:acobster,项目名称:wp-custom-field-traits,代码行数:5,代码来源:Base.php

示例11: tearDown

 function tearDown()
 {
     \WP_Mock::tearDown();
     parent::tearDown();
 }
开发者ID:vccabral,项目名称:login-lockout,代码行数:5,代码来源:test-login-lockout.php

示例12: tearDown

 function tearDown()
 {
     global $WPCF7_Submission_mock;
     \WP_Mock::tearDown();
     $WPCF7_Submission_mock = null;
 }
开发者ID:niteoweb,项目名称:CF7GHQ,代码行数:6,代码来源:TestPlugin.php

示例13: tearDown

 /**
  * Clean up after the test is run
  */
 function tearDown()
 {
     \WP_Mock::tearDown();
     unset($this->instance);
 }
开发者ID:ryanwelcher,项目名称:unit-test-wp-mock,代码行数:8,代码来源:Real_World_Tests.php

示例14: tearDown

 public function tearDown()
 {
     \WP_Mock::tearDown();
 }
开发者ID:eriktorsner,项目名称:wp-bootstrap-test,代码行数:4,代码来源:MenusManagerTest.php

示例15: tearDown

 public function tearDown()
 {
     \WP_Mock::tearDown();
     \Dxw\Iguana\Theme\Layout::$wordpress_template = null;
     \Dxw\Iguana\Theme\Layout::$base = null;
 }
开发者ID:dxw,项目名称:iguana-theme,代码行数:6,代码来源:layout_test.php


注:本文中的WP_Mock::tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。