Skip to content

Commit

Permalink
Remove dummy test. I think we found the plugin for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Sep 9, 2016
1 parent 013ad0a commit 4c6f797
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 48 deletions.
5 changes: 5 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ function _tests_cmb2_manually_load_plugin() {
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = '/tmp/wordpress/wp-content/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
}

require_once $plugin . '/init.php';
Expand Down
48 changes: 0 additions & 48 deletions tests/test-cmb-rest-registered-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,54 +65,6 @@ public function tearDown() {
parent::tearDown();
}

public function test_wp_api_installed() {
global $test_root;

$rest_api = '';

if (
( $rest_api = CMB2_WP_CONTENT . '/plugins/WP-API/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = CMB2_WP_CONTENT . '/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = dirname( $test_root ) . '/wp-content/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = dirname( dirname( $test_root ) ) . '/wordpress/wp-content/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
} elseif (
( $rest_api = '/tmp/wordpress/wp-content/plugins/rest-api/plugin.php' )
&& file_exists( $rest_api )
) {
require_once $rest_api;
}

$this->assertEquals( array(
'/tmp/wordpress/tests',
dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/plugins/WP-API/plugin.php',
true
), array(
$test_root,
$rest_api,
file_exists( $rest_api ),
) );
}

public function test_rest_posts_controller_exists() {
$this->assertTrue( class_exists( 'WP_REST_Posts_Controller' ) );
}
Expand Down

0 comments on commit 4c6f797

Please sign in to comment.