-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* Tests for Ghostkit Main Class | ||
* | ||
* @package ghostkit | ||
*/ | ||
|
||
/** | ||
* Ghostkit test case. | ||
*/ | ||
class GhostkitTest extends WP_UnitTestCase { | ||
/** | ||
* Set up our mocked WP functions. Rather than setting up a database we can mock the returns of core WordPress functions. | ||
* | ||
* @return void | ||
*/ | ||
public function set_up() { | ||
parent::set_up(); | ||
} | ||
|
||
/** | ||
* Tear down WP Mock. | ||
* | ||
* @return void | ||
*/ | ||
public function tear_down() { | ||
parent::tear_down(); | ||
} | ||
|
||
/** | ||
* Plugin Path test. | ||
*/ | ||
public function test_plugin_path() { | ||
$defined_path = '/var/www/html/wp-content/plugins/ghostkit/'; | ||
$plugin_path = ghostkit()->plugin_path; | ||
|
||
$this->assertEquals( $defined_path, $plugin_path ); | ||
} | ||
|
||
/** | ||
* Plugin Url test. | ||
*/ | ||
public function test_plugin_url() { | ||
$defined_url = 'http://localhost:8889/wp-content/plugins/var/www/html/wp-content/plugins/ghostkit/'; | ||
$plugin_url = ghostkit()->plugin_url; | ||
|
||
$this->assertEquals( $defined_url, $plugin_url ); | ||
} | ||
} |