2024-09-21 11:00:33 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Class SampleTest
|
|
|
|
*
|
|
|
|
* @package Activitypub_Event_Extensions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sample test case.
|
|
|
|
*/
|
|
|
|
class Test_Sample extends WP_UnitTestCase {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A single example test.
|
|
|
|
*/
|
|
|
|
public function test_sample() {
|
|
|
|
// Replace this with some actual testing code.
|
|
|
|
$this->assertTrue( true );
|
|
|
|
}
|
2024-09-23 20:07:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tesd tes
|
|
|
|
*/
|
|
|
|
public function test_the_events_calendar() {
|
2024-09-23 20:17:28 +02:00
|
|
|
// First check manually that The Events Calendar is loaded.
|
|
|
|
$class = class_exists( '\Tribe__Events__Main' );
|
|
|
|
$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' ));
|
2024-09-23 20:07:36 +02:00
|
|
|
}
|
2024-09-21 11:00:33 +02:00
|
|
|
}
|