-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#10 Unit testing for global function.
- Loading branch information
Showing
7 changed files
with
39 additions
and
6 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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|
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,39 @@ | ||
<?php | ||
|
||
use TenQuality\WP\Database\QueryBuilder; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* Test. | ||
* | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
* @version 1.0.9 | ||
*/ | ||
class FunctionsTest extends TestCase | ||
{ | ||
/** | ||
* Test function exists | ||
* @since 1.0.9 | ||
* @group functions | ||
* @requires function wp_query_builder | ||
*/ | ||
public function testExists() | ||
{ | ||
$this->assertTrue( function_exists( 'wp_query_builder' ), 'Function wp_query_builder no being autoloaded.' ); | ||
} | ||
/** | ||
* Test instance of | ||
* @since 1.0.0 | ||
* @group functions | ||
* @requires function wp_query_builder | ||
*/ | ||
public function testInstanceOf() | ||
{ | ||
// Prepare and run | ||
$builder = wp_query_builder(); | ||
// Assert | ||
$this->assertInstanceOf( QueryBuilder::class, $builder ); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
/** | ||
* Test. | ||
* | ||
* @author Local Vibes <https://localvibes.co/> Hyper Tribal | ||
* @author 10 Quality <[email protected]> | ||
* @license MIT | ||
* @package wp-query-builder | ||
|