test
This commit is contained in:
parent
8d2c8b2d35
commit
cc3b8e4a91
2 changed files with 11 additions and 4 deletions
|
@ -30,7 +30,7 @@ require_once "{$_tests_dir}/includes/functions.php";
|
||||||
*/
|
*/
|
||||||
function _manually_load_plugin() {
|
function _manually_load_plugin() {
|
||||||
require dirname( __DIR__ ) . '/activitypub-event-extensions.php';
|
require dirname( __DIR__ ) . '/activitypub-event-extensions.php';
|
||||||
$event_plugin = getenv( 'WP_EVENT_PLUGIN' );
|
$event_plugin = 'the-events-calendar';
|
||||||
switch ( $event_plugin ) {
|
switch ( $event_plugin ) {
|
||||||
case 'the-events-calendar':
|
case 'the-events-calendar':
|
||||||
require ABSPATH . '/wp-content/mu-plugins/the-events-calendar/the-events-calendar.php';
|
require ABSPATH . '/wp-content/mu-plugins/the-events-calendar/the-events-calendar.php';
|
||||||
|
|
|
@ -22,8 +22,15 @@ class Test_Sample extends WP_UnitTestCase {
|
||||||
* Tesd tes
|
* Tesd tes
|
||||||
*/
|
*/
|
||||||
public function test_the_events_calendar() {
|
public function test_the_events_calendar() {
|
||||||
// Replace this with some actual testing code.
|
// First check manually that The Events Calendar is loaded.
|
||||||
$class_exists = class_exists( 'Tribe__Events__Main' );
|
$class = class_exists( '\Tribe__Events__Main' );
|
||||||
$this->assertTrue( $class_exists );
|
$this->assertTrue( $class );
|
||||||
|
|
||||||
|
// Get instance of our plugin.
|
||||||
|
$aec = \Activitypub_Event_Extensions\Setup::get_instance();
|
||||||
|
$this->assertContains( 'the-events-calendar', $aec->get_active_event_plugins() );
|
||||||
|
|
||||||
|
$aec->activate_activitypub_support_for_active_event_plugins();
|
||||||
|
$this->assertContains( 'tribe_events', get_option( 'activitypub_support_post_types' ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue