當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wl_configure_wordpress_test函數代碼示例

本文整理匯總了PHP中wl_configure_wordpress_test函數的典型用法代碼示例。如果您正苦於以下問題:PHP wl_configure_wordpress_test函數的具體用法?PHP wl_configure_wordpress_test怎麽用?PHP wl_configure_wordpress_test使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wl_configure_wordpress_test函數的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     wl_configure_wordpress_test();
     wl_empty_blog();
     rl_empty_dataset();
 }
開發者ID:efueger,項目名稱:wordlift-plugin,代碼行數:10,代碼來源:test-entity-creation-via-post-creation.php

示例2: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     $this->log_service = Wordlift_Log_Service::get_logger('UserServiceTest');
     wl_configure_wordpress_test();
     // wl_empty_blog();
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:10,代碼來源:test-user-service.php

示例3: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Empty the blog.
     wl_empty_blog();
 }
開發者ID:efueger,項目名稱:wordlift-plugin,代碼行數:11,代碼來源:test-shortcode-field.php

示例4: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Empty the blog.
     wl_empty_blog();
     add_theme_support('post-thumbnails');
 }
開發者ID:efueger,項目名稱:wordlift-plugin,代碼行數:12,代碼來源:test-shortcode-timeline.php

示例5: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Empty the blog.
     wl_empty_blog();
     // Empty the local cache.
     system('rm -rf ' . wl_caching_get_cache_folder());
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:13,代碼來源:test-caching.php

示例6: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Reset data on the remote dataset.
     rl_empty_dataset();
     // Empty the blog.
     wl_empty_blog();
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:13,代碼來源:test-metaboxes.php

示例7: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Empty the blog.
     wl_empty_blog();
     // Check that entities and posts have been deleted.
     $this->assertEquals(0, count(get_posts(array('posts_per_page' => -1, 'post_type' => 'post', 'post_status' => 'any'))));
     $this->assertEquals(0, count(get_posts(array('posts_per_page' => -1, 'post_type' => 'entity', 'post_status' => 'any'))));
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:14,代碼來源:test-entity-images.php

示例8: setUp

 /**
  * Set up the test fixture.
  * Override wp_die(), pretend to be ajax, and suppres E_WARNINGs
  */
 public function setUp()
 {
     parent::setUp();
     // Suppress warnings from "Cannot modify header information - headers already sent by"
     $this->_error_level = error_reporting();
     error_reporting($this->_error_level & ~E_WARNING);
     wl_configure_wordpress_test();
     add_filter('wp_die_ajax_handler', array($this, 'getDieHandler'), 1, 1);
     if (!defined('DOING_AJAX')) {
         define('DOING_AJAX', true);
     }
     // Disable the *wl_write_log* as it can create issues with AJAX tests.
     add_filter('wl_write_log_handler', array($this, 'get_write_log_handler'), 1, 1);
     wl_empty_blog();
 }
開發者ID:efueger,項目名稱:wordlift-plugin,代碼行數:19,代碼來源:test-ajax.php

示例9: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     wl_configure_wordpress_test();
     wl_empty_blog();
     $this->assertEquals(0, count(get_posts(array('posts_per_page' => -1, 'post_type' => 'post', 'post_status' => 'any'))));
     $this->assertEquals(0, count(get_posts(array('posts_per_page' => -1, 'post_type' => 'entity', 'post_status' => 'any'))));
     // Empty the remote dataset.
     rl_empty_dataset();
     // Get the count of triples.
     $counts = rl_count_triples();
     $this->assertNotNull($counts);
     $this->assertFalse(is_wp_error($counts));
     //		$this->assertEquals( 0, $counts['subjects'] );
     //		$this->assertEquals( 0, $counts['predicates'] );
     //		$this->assertEquals( 0, $counts['objects'] );
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:20,代碼來源:test-post.php

示例10: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Reset data on the remote dataset.
     rl_empty_dataset();
     // Check that the dataset is empty.
     //        $this->assertEquals( array(
     //            'subjects'   => 0,
     //            'predicates' => 0,
     //            'objects'    => 0
     //        ), rl_count_triples() );
     // Empty the blog.
     wl_empty_blog();
     // Check that entities and posts have been deleted.
     $this->assertEquals(0, count(get_posts(array('posts_per_page' => -1, 'post_type' => array('post', 'page', 'entity'), 'post_status' => 'any'))));
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:21,代碼來源:test-page.php

示例11: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     // Configure WordPress with the test settings.
     wl_configure_wordpress_test();
     // Empty the blog.
     wl_empty_blog();
     // Creating 2 fake entities
     $entities = array(wl_create_post('content', 'entity1', 'title1', 'publish', 'entity'), wl_create_post('content', 'entity2', 'title2', 'publish', 'entity'));
     // Creating a fake post
     self::$FIRST_POST_ID = wl_create_post('content', 'post1', 'title1', 'publish', 'post');
     wl_core_add_relation_instances(self::$FIRST_POST_ID, WL_WHAT_RELATION, $entities);
     // Creating another fake post and entity (the most connected one)
     // Creating a fake post
     $new_post = wl_create_post('content', 'post2', 'title2', 'publish', 'post');
     // Create the most connected entity
     self::$MOST_CONNECTED_ENTITY_ID = wl_create_post('content', 'entity2', 'title2', 'publish', 'entity');
     wl_core_add_relation_instance($new_post, WL_WHAT_RELATION, self::$MOST_CONNECTED_ENTITY_ID);
     wl_core_add_relation_instance(self::$FIRST_POST_ID, WL_WHAT_RELATION, self::$MOST_CONNECTED_ENTITY_ID);
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:23,代碼來源:test-shortcode-chord.php

示例12: setUp

 /**
  * Set up the test.
  */
 function setUp()
 {
     parent::setUp();
     wl_configure_wordpress_test();
 }
開發者ID:Byrlyne,項目名稱:wordlift-plugin,代碼行數:8,代碼來源:test-sanitize-uri-path.php


注:本文中的wl_configure_wordpress_test函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。