Skip to content

Commit

Permalink
Add uninstall test
Browse files Browse the repository at this point in the history
See #6
  • Loading branch information
JDGrimes committed Jul 23, 2016
1 parent 349d934 commit 3377d01
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 0 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"wordpoints/module-uninstall-tester": "^0.3.0"
}
}
88 changes: 88 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions tests/phpunit/tests/uninstall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

/**
* Test case for the module's unisntallation routine.
*
* @package WordPoints_Beta_Tester
* @since 1.0.4
*/

/**
* Test that the module uninstalls itself properly.
*
* @since 1.0.4
*
* @group uninstall
*/
class WordPoints_Beta_Tester_Uninstall_Test extends WordPoints_Module_Uninstall_UnitTestCase {

/**
* @since 1.0.4
*/
public function setUp() {

$this->module_file = 'beta-tester/beta-tester.php';

parent::setUp();
}

/**
* Tests uninstallation.
*
* @since 1.0.4
*/
public function test() {

add_site_option( 'wordpoints_beta_version', 'test' );

$this->uninstall();

$this->assertEmpty( get_site_option( 'wordpoints_beta_version' ) );
}
}

// EOF

0 comments on commit 3377d01

Please sign in to comment.