當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。