diff --git a/phpunit.xml b/phpunit.xml index 16a39027e72be2cf0a2656056074b6e6ed818be1..2d460ab2c2774d6f8fdf3aec6c40083c451d57d5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,7 @@ convertWarningsToExceptions="true" > <testsuites> - <testsuite> + <testsuite name="external-permalinks-redux"> <directory prefix="test-" suffix=".php">./tests/</directory> <exclude>./tests/test-sample.php</exclude> </testsuite> diff --git a/tests/test-admin-callbacks.php b/tests/test-admin-callbacks.php index 61ccbb053b8b313010590fa3833010a55076780b..ded6af38746028264a91a07acf6764782dbd66fd 100755 --- a/tests/test-admin-callbacks.php +++ b/tests/test-admin-callbacks.php @@ -43,8 +43,8 @@ class AdminCallbacks extends WP_UnitTestCase { /** * Create some objects with redirects. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->plugin = external_permalinks_redux::get_instance(); @@ -65,10 +65,10 @@ class AdminCallbacks extends WP_UnitTestCase { $this->plugin->meta_box( get_post( $this->post_id ) ); $meta_box_contents = ob_get_clean(); - $this->assertContains( 'value="' . $this->nonce . '"', $meta_box_contents ); + $this->assertStringContainsString( 'value="' . $this->nonce . '"', $meta_box_contents ); foreach ( array_keys( $this->plugin->status_codes ) as $code ) { - $this->assertContains( 'value="' . $code . '"', $meta_box_contents ); + $this->assertStringContainsString( 'value="' . $code . '"', $meta_box_contents ); } } @@ -82,7 +82,7 @@ class AdminCallbacks extends WP_UnitTestCase { $this->plugin->action_save_post( $this->post_id ); - $this->assertEquals( static::DESTINATION, get_post_meta( $this->post_id, $this->plugin->meta_key_target, true ) ); - $this->assertEquals( static::TYPE, get_post_meta( $this->post_id, $this->plugin->meta_key_type, true ) ); + $this->assertStringContainsString( static::DESTINATION, get_post_meta( $this->post_id, $this->plugin->meta_key_target, true ) ); + $this->assertStringContainsString( (string) static::TYPE, get_post_meta( $this->post_id, $this->plugin->meta_key_type, true ) ); } } diff --git a/tests/test-permalink-filters.php b/tests/test-permalink-filters.php index 508318f733a72e1b81a3b1936d5c69b5461336a0..ea3f2e40c6a970b7f33b6a1b5603277c45911b07 100755 --- a/tests/test-permalink-filters.php +++ b/tests/test-permalink-filters.php @@ -31,8 +31,8 @@ class PermalinkFilters extends WP_UnitTestCase { /** * Create some objects with redirects. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $plugin = external_permalinks_redux::get_instance(); diff --git a/tests/test-redirect-callbacks.php b/tests/test-redirect-callbacks.php index be3eea3c353233ae1e28742a23b9351493c6b684..a09b89f30a69c04b9a16dd1b3afdd14dc0a8f602 100755 --- a/tests/test-redirect-callbacks.php +++ b/tests/test-redirect-callbacks.php @@ -24,8 +24,8 @@ class RedirectCallbacks extends WP_UnitTestCase { /** * Create some objects with redirects. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->plugin = external_permalinks_redux::get_instance(); }