Skip to content

Commit

Permalink
#10 Unit testing for global function.
Browse files Browse the repository at this point in the history
  • Loading branch information
amostajo committed Jun 26, 2020
1 parent 13f9f26 commit 780ad6e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 6 deletions.
1 change: 0 additions & 1 deletion tests/cases/AbstractModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down
39 changes: 39 additions & 0 deletions tests/cases/FunctionsTest.php
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 );
}
}
1 change: 0 additions & 1 deletion tests/cases/QueryBuilderConditionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down
1 change: 0 additions & 1 deletion tests/cases/QueryBuilderOperationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down
1 change: 0 additions & 1 deletion tests/cases/QueryBuilderStatementsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down
1 change: 0 additions & 1 deletion tests/cases/SanitizationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down
1 change: 0 additions & 1 deletion tests/cases/TraitModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/**
* Test.
*
* @author Local Vibes <https://localvibes.co/> Hyper Tribal
* @author 10 Quality <[email protected]>
* @license MIT
* @package wp-query-builder
Expand Down

0 comments on commit 780ad6e

Please sign in to comment.