Skip to content

Commit c73fcb9

Browse files
committed
Add some dummy tests to figure out where travis expects the wp-api plugin
1 parent 30aa4fc commit c73fcb9

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

tests/bootstrap.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ function _tests_cmb2_manually_load_plugin() {
3939
$wp_content = dirname( dirname( $plugin ) );
4040

4141
if (
42-
( $rest_api = $wp_content . '/plugins/WP-API/plugin.php' )
43-
&& file_exists( $rest_api )
44-
) {
45-
require_once $rest_api;
46-
} elseif (
47-
( $rest_api = $wp_content . '/plugins/rest-api/plugin.php' )
48-
&& file_exists( $rest_api )
49-
) {
50-
require_once $rest_api;
51-
} elseif (
5242
( $rest_api = dirname( $test_root ) . '/wp-content/plugins/rest-api/plugin.php' )
5343
&& file_exists( $rest_api )
5444
) {

tests/test-cmb-rest-registered-fields.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ public function tearDown() {
6565
parent::tearDown();
6666
}
6767

68+
public function test_wp_api_installed() {
69+
global $test_root;
70+
71+
$this->assertEquals( '/tmp/wordpress/tests', $test_root );
72+
$rest_api = dirname( $test_root ) . '/wp-content/plugins/rest-api/plugin.php';
73+
$this->assertEquals( '/tmp/wordpress/wp-content/plugins/rest-api/plugin.php', $rest_api );
74+
$this->assertTrue( file_exists( $rest_api ) );
75+
}
76+
6877
public function test_rest_posts_controller_exists() {
6978
$this->assertTrue( class_exists( 'WP_REST_Posts_Controller' ) );
7079
}

0 commit comments

Comments
 (0)