| 1 |
<?php |
| 2 |
use PHPUnit\Framework\TestCase; |
| 3 |
|
| 4 |
class ActivatorDeactivatorTest extends TestCase { |
| 5 |
public function test_activate_deletes_transient() { |
| 6 |
global $deleted_transients; |
| 7 |
$deleted_transients = []; |
| 8 |
Mlsimport_Activator::activate(); |
| 9 |
$this->assertContains( 'mlsimport_plugin_data_schema', $deleted_transients ); |
| 10 |
} |
| 11 |
|
| 12 |
public function test_deactivate_deletes_options() { |
| 13 |
global $deleted_transients, $deleted_options; |
| 14 |
$deleted_transients = []; |
| 15 |
$deleted_options = []; |
| 16 |
Mlsimport_Deactivator::deactivate(); |
| 17 |
$this->assertContains( 'mlsimport_plugin_data_schema', $deleted_transients ); |
| 18 |
$this->assertContains( 'mlsimport_admin_options', $deleted_options ); |
| 19 |
} |
| 20 |
} |
| 21 |
|