Skip to content

Commit b558e57

Browse files
committed
use set_up and tear_down
1 parent 20ba2fe commit b558e57

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/test-cptp-module-permalink.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class CPTP_Module_Permalink_Test extends WP_UnitTestCase {
55
public $post_type;
66
public $taxonomy;
77

8-
public function setUp() {
8+
public function set_up() {
99
/* @var WP_Rewrite $wp_rewrite */
1010
global $wp_rewrite;
11-
parent::setUp();
11+
parent::set_up();
1212

1313
delete_option( 'category_base' );
1414
add_option( 'category_base', rand_str( 12 ) );
@@ -28,7 +28,7 @@ public function setUp() {
2828
$this->taxonomy = 'ctax';
2929
}
3030

31-
public function tearDown() {
31+
public function tear_down() {
3232
_unregister_post_type( $this->post_type );
3333
_unregister_taxonomy( $this->taxonomy );
3434
}

tests/test-cptp-module-rewrite.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ class CPTP_Module_Rewrite_Test extends WP_UnitTestCase {
55
public $post_type;
66
public $taxonomy;
77

8-
public function setUp() {
8+
public function set_up() {
99
/** @var WP_Rewrite $wp_rewrite */
1010
global $wp_rewrite;
1111

12-
parent::setUp();
12+
parent::set_up();
1313

1414
delete_option( 'no_taxonomy_structure' );
1515
add_option( 'no_taxonomy_structure', false );
@@ -29,7 +29,7 @@ public function setUp() {
2929
$this->taxonomy = rand_str( 12 );
3030
}
3131

32-
public function tearDown() {
32+
public function tear_down() {
3333
_unregister_post_type( $this->post_type );
3434
_unregister_taxonomy( $this->taxonomy, $this->post_type );
3535
}

tests/test-cptp-module-setting.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
class CPTP_Module_Setting_Test extends WP_UnitTestCase {
44

5-
public function setUp() {
5+
public function set_up() {
66
/** @var WP_Rewrite $wp_rewrite */
77
global $wp_rewrite;
8-
parent::setUp();
8+
parent::set_up();
99

1010
$wp_rewrite->init();
1111
$wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );

tests/test-cptp-util.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class CPTP_Util_Test extends WP_UnitTestCase {
1313
/**
1414
* Setup.
1515
*/
16-
public function setUp() {
16+
public function set_up() {
1717
/**
1818
* WP_Rewrite
1919
*
2020
* @var WP_Rewrite $wp_rewrite
2121
*/
2222
global $wp_rewrite;
23-
parent::setUp();
23+
parent::set_up();
2424

2525
$wp_rewrite->init();
2626
$wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );

0 commit comments

Comments
 (0)