Changeset 35311 for trunk/tests/phpunit/tests/ajax/TagSearch.php
- Timestamp:
- 10/21/2015 03:17:36 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/TagSearch.php
r25002 r35311 20 20 * @var array 21 21 */ 22 private $_terms = array(22 private static $terms = array( 23 23 'chattels', 'depo', 'energumen', 'figuriste', 'habergeon', 'impropriation' 24 24 ); 25 25 26 /** 27 * Setup 28 * @todo use a term factory 29 */ 30 public function setUp() { 31 parent::setUp(); 26 private static $term_ids = array(); 32 27 33 foreach ( $this->_terms as $term ) 34 wp_insert_term( $term, 'post_tag' ); 28 public static function wpSetUpBeforeClass() { 29 foreach ( self::$terms as $t ) { 30 self::$term_ids[] = wp_insert_term( $t, 'post_tag' ); 31 } 32 } 33 34 public static function wpTearDownAfterClass() { 35 foreach ( self::$term_ids as $t ) { 36 wp_delete_term( $t, 'post_tag' ); 37 } 35 38 } 36 39
Note: See TracChangeset
for help on using the changeset viewer.