From 4d3c3d5f190da7912d63c2bffc22db37a7c8cf6b Mon Sep 17 00:00:00 2001 From: Josh Pollock <josh@calderawp.com> Date: Thu, 5 Apr 2018 14:17:20 -0400 Subject: [PATCH] fix name of select query class --- Tests/Integration/EntryQueriesGeneratorsTest.php | 2 +- Tests/Integration/EntryQueriesTest.php | 6 +++--- Tests/Integration/IntegrationTestCase.php | 6 +++--- Tests/Integration/TestsTest.php | 4 ++-- Tests/Traits/HasFactories.php | 6 +++--- Tests/Unit/EntryQueriesTest.php | 12 ++++++------ Tests/Unit/TestCase.php | 2 +- src/{SelectsCreatesSelect.php => SelectQueries.php} | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) rename src/{SelectsCreatesSelect.php => SelectQueries.php} (95%) diff --git a/Tests/Integration/EntryQueriesGeneratorsTest.php b/Tests/Integration/EntryQueriesGeneratorsTest.php index 1fb31c0..ffcafbc 100644 --- a/Tests/Integration/EntryQueriesGeneratorsTest.php +++ b/Tests/Integration/EntryQueriesGeneratorsTest.php @@ -4,7 +4,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Integration; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\CreatesSelectQueries; use calderawp\CalderaFormsQuery\Select\EntryValues; use calderawp\CalderaFormsQuery\Tests\Traits\CanCreateEntryWithEmailField; diff --git a/Tests/Integration/EntryQueriesTest.php b/Tests/Integration/EntryQueriesTest.php index d17ef6f..1931b7a 100644 --- a/Tests/Integration/EntryQueriesTest.php +++ b/Tests/Integration/EntryQueriesTest.php @@ -4,7 +4,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Integration; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\Tests\Traits\CanCreateEntryWithEmailField; use calderawp\CalderaFormsQuery\Tests\Traits\HasFactories; use calderawp\CalderaFormsQuery\Tests\Traits\UsersMockFormAsDBForm; @@ -26,7 +26,7 @@ class EntryQueriesTest extends IntegrationTestCase /** * Test that getResults method runs queries against WordPress correctly * - * @covers SelectsCreatesSelect::getResults() + * @covers SelectQueries::getResults() */ public function testGetResultsCanDoSQL(){ $details = $this->create_entry( $this->mock_form ); @@ -44,7 +44,7 @@ class EntryQueriesTest extends IntegrationTestCase /** * Test that we can run queries and the environment can update DB * - * @covers SelectsCreatesSelect::getResults() + * @covers SelectQueries::getResults() */ public function testCanQuery() { diff --git a/Tests/Integration/IntegrationTestCase.php b/Tests/Integration/IntegrationTestCase.php index 3d0a4d7..4e7621e 100755 --- a/Tests/Integration/IntegrationTestCase.php +++ b/Tests/Integration/IntegrationTestCase.php @@ -3,7 +3,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Integration; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\Tests\Traits\HasFactories; use calderawp\CalderaFormsQuery\Tests\Traits\UsersMockFormAsDBForm; @@ -57,12 +57,12 @@ abstract class IntegrationTestCase extends \WP_UnitTestCase } /** - * @return SelectsCreatesSelect + * @return SelectQueries */ protected function entryQueriesFactory() { - return new SelectsCreatesSelect( + return new SelectQueries( $this->entryGeneratorFactory(), $this->entryValuesGeneratorFactory(), $this->getWPDB() diff --git a/Tests/Integration/TestsTest.php b/Tests/Integration/TestsTest.php index 6abb0d7..d4ecd31 100644 --- a/Tests/Integration/TestsTest.php +++ b/Tests/Integration/TestsTest.php @@ -3,7 +3,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Integration; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\Select\Entry; use calderawp\CalderaFormsQuery\Select\EntryValues; @@ -45,7 +45,7 @@ class TestsTest extends IntegrationTestCase */ public function testFactory() { - $this->assertTrue(is_a($this->entryQueriesFactory(), SelectsCreatesSelect::class)); + $this->assertTrue(is_a($this->entryQueriesFactory(), SelectQueries::class)); $this->assertTrue(is_a($this->entryValuesGeneratorFactory(), EntryValues::class)); $this->assertTrue(is_a($this->entryGeneratorFactory(), Entry::class)); diff --git a/Tests/Traits/HasFactories.php b/Tests/Traits/HasFactories.php index 5a2f7a5..7c517ed 100644 --- a/Tests/Traits/HasFactories.php +++ b/Tests/Traits/HasFactories.php @@ -3,7 +3,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Traits; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; trait HasFactories { @@ -64,12 +64,12 @@ trait HasFactories /** - * @return SelectsCreatesSelect + * @return SelectQueries */ protected function entryQueriesFactory() { - return new SelectsCreatesSelect( + return new SelectQueries( $this->entryGeneratorFactory(), $this->entryValuesGeneratorFactory(), $this->getWPDB() diff --git a/Tests/Unit/EntryQueriesTest.php b/Tests/Unit/EntryQueriesTest.php index 414619e..c7f9b5a 100644 --- a/Tests/Unit/EntryQueriesTest.php +++ b/Tests/Unit/EntryQueriesTest.php @@ -3,7 +3,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Unit; -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\Select\Entry; use calderawp\CalderaFormsQuery\Select\EntryValues; use calderawp\CalderaFormsQuery\Select\SelectQueryBuilder; @@ -14,8 +14,8 @@ class EntryQueriesTest extends TestCase /** * Test getting entry SQL generator * - * @covers SelectsCreatesSelect::getEntryGenerator() - * @covers SelectsCreatesSelect::$entryGenerator + * @covers SelectQueries::getEntryGenerator() + * @covers SelectQueries::$entryGenerator */ public function testGetEntryGenerator() { @@ -26,8 +26,8 @@ class EntryQueriesTest extends TestCase /** * Test getting entry values SQL generator * - * @covers SelectsCreatesSelect::getEntryValueGenerator() - * @covers SelectsCreatesSelect::$entryValueGenerator + * @covers SelectQueries::getEntryValueGenerator() + * @covers SelectQueries::$entryValueGenerator */ public function testGetEntryValueGenerator() { @@ -38,7 +38,7 @@ class EntryQueriesTest extends TestCase /** * Test that getResults method returns an array * - * @covers SelectsCreatesSelect::getResults() + * @covers SelectQueries::getResults() */ public function testGetResults() { diff --git a/Tests/Unit/TestCase.php b/Tests/Unit/TestCase.php index 6f7a68d..3040fb6 100755 --- a/Tests/Unit/TestCase.php +++ b/Tests/Unit/TestCase.php @@ -5,7 +5,7 @@ namespace calderawp\CalderaFormsQuery\Tests\Unit; //Import PHP unit test case. //Must be aliased to avoid having two classes of same name in scope. -use calderawp\CalderaFormsQuery\SelectsCreatesSelect; +use calderawp\CalderaFormsQuery\SelectQueries; use calderawp\CalderaFormsQuery\Tests\Traits\HasFactories; use PHPUnit\Framework\TestCase as FrameworkTestCase; diff --git a/src/SelectsCreatesSelect.php b/src/SelectQueries.php similarity index 95% rename from src/SelectsCreatesSelect.php rename to src/SelectQueries.php index 8a67dd8..a64a0cb 100644 --- a/src/SelectsCreatesSelect.php +++ b/src/SelectQueries.php @@ -7,11 +7,11 @@ use calderawp\CalderaFormsQuery\Select\Entry; use calderawp\CalderaFormsQuery\Select\EntryValues; /** - * Class EntryQueries + * Class SelectQueries * - * Used to query entry data, using SQL created by genrators + * Used to query entry data, using SQL created by generators */ -class SelectsCreatesSelect implements CreatesSelectQueries +class SelectQueries implements CreatesSelectQueries { /** * SQL generator for entry table -- GitLab