File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments