Disable leaderboard tests if admin is not installed
This commit is contained in:
parent
e45cd8addf
commit
4a860656c5
|
@ -47,6 +47,10 @@ class Leaderboards extends WC_REST_Unit_Test_Case {
|
||||||
* Setup our test server, endpoints, and user info.
|
* Setup our test server, endpoints, and user info.
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
|
if ( ! class_exists( '\WC_Admin_Reports_Sync' ) ) {
|
||||||
|
$this->markTestSkipped( 'Skipping reports tests - WC_Admin_Reports_Sync class not found.' );
|
||||||
|
return;
|
||||||
|
}
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
wp_set_current_user( self::$user );
|
wp_set_current_user( self::$user );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue