-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce and implement
AdminSettings_UnitTestCase
(#213)
- Loading branch information
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Abstract base test class for \AspireUpdate\Admin_Settings. | ||
* | ||
* All \AspireUpdate\Admin_Settings unit tests should inherit from this class. | ||
*/ | ||
abstract class AdminSettings_UnitTestCase extends WP_UnitTestCase { | ||
/** | ||
* The Name of the Option. | ||
* | ||
* @var string | ||
*/ | ||
protected static $option_name = 'aspireupdate_settings'; | ||
|
||
/** | ||
* Deletes settings before each test runs. | ||
* | ||
* @return void | ||
*/ | ||
public function set_up() { | ||
parent::set_up(); | ||
|
||
delete_site_option( self::$option_name ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters