diff --git a/bin/migrate b/bin/migrate index af5124b..8699403 100755 --- a/bin/migrate +++ b/bin/migrate @@ -7,7 +7,7 @@ use Gt\Cli\Application; use Gt\Cli\Argument\CommandArgumentList; -use Gt\Database\Cli\ExecuteCommand; +use GT\Database\Cli\ExecuteCommand; // The script must be run from the context of a project's root directory. foreach([ __DIR__ . "/../../..", __DIR__ . "/../vendor" ] as $vendor) { diff --git a/composer.json b/composer.json index 56d2817..417fc85 100644 --- a/composer.json +++ b/composer.json @@ -40,11 +40,13 @@ "autoload": { "psr-4": { + "GT\\Database\\": "./src", "Gt\\Database\\": "./src" } }, "autoload-dev": { "psr-4": { + "GT\\Database\\Test\\": "./test/phpunit", "Gt\\Database\\Test\\": "./test/phpunit" } }, diff --git a/example/01-quick-start.php b/example/01-quick-start.php index 41241d0..ae358b4 100644 --- a/example/01-quick-start.php +++ b/example/01-quick-start.php @@ -1,5 +1,5 @@ queryCollection($name); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNestedProvider */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathNestedProvider */ public function testQueryCollectionDots( array $nameParts, string $path, @@ -88,7 +88,7 @@ public function testQueryCollectionDots( self::assertInstanceOf(QueryCollection::class, $queryCollection); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryCollectionPathNotExistsProvider() */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryCollectionPathNotExistsProvider() */ public function testQueryCollectionPhp( string $name, string $path, diff --git a/test/phpunit/Helper/Helper.php b/test/phpunit/Helper/Helper.php index ae3a781..f71234c 100644 --- a/test/phpunit/Helper/Helper.php +++ b/test/phpunit/Helper/Helper.php @@ -1,5 +1,5 @@ query("getSource"); } finally { diff --git a/test/phpunit/Query/QueryFactoryTest.php b/test/phpunit/Query/QueryFactoryTest.php index a9939ae..1d8fb0f 100644 --- a/test/phpunit/Query/QueryFactoryTest.php +++ b/test/phpunit/Query/QueryFactoryTest.php @@ -1,22 +1,22 @@ findQueryFilePath($queryName); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExtensionNotValidProvider */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathExtensionNotValidProvider */ public function testFindQueryFilePathWithInvalidExtension( string $queryName, string $directoryOfQueries @@ -58,7 +58,7 @@ public function testFindQueryFilePathWithInvalidExtension( $queryFactory->findQueryFilePath($queryName); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testQueryCreated( string $queryName, string $directoryOfQueries @@ -97,7 +97,7 @@ public function testSelectsCorrectFile() { } } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider */ public function testCreatePhp( string $queryName, string $directoryOfQueries, diff --git a/test/phpunit/Query/QueryTest.php b/test/phpunit/Query/QueryTest.php index 1c74a21..d3be1ab 100644 --- a/test/phpunit/Query/QueryTest.php +++ b/test/phpunit/Query/QueryTest.php @@ -1,16 +1,16 @@ getFilePath()); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testBadPreparedStatementThrowsException( string $queryName, string $queryCollectionPath, @@ -64,7 +64,7 @@ public function testBadPreparedStatementThrowsException( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testPreparedStatement( string $queryName, @@ -83,7 +83,7 @@ public function testPreparedStatement( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testLastInsertId( string $queryName, @@ -140,7 +140,7 @@ public function testSubsequentCalls() { } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testPlaceholderReplacement( string $queryName, @@ -159,7 +159,7 @@ public function testPlaceholderReplacement( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider */ public function testPlaceholderReplacementInComments( string $queryName, @@ -218,7 +218,7 @@ public function testPlaceholderReplacementSubsequentCalls() { } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testSpecialBindingsNoAscDesc( string $queryName, @@ -244,7 +244,7 @@ public function testSpecialBindingsNoAscDesc( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testSpecialBindingsAscDesc( string $queryName, @@ -264,7 +264,7 @@ public function testSpecialBindingsAscDesc( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testSpecialBindingsInClause( string $queryName, @@ -302,7 +302,7 @@ public function testSpecialBindingsInClause( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testDynamicBindingsInsertMultiple( string $queryName, @@ -342,7 +342,7 @@ public function testDynamicBindingsInsertMultiple( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testDynamicBindingsWhereIn( string $queryName, @@ -367,7 +367,7 @@ public function testDynamicBindingsWhereIn( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testDynamicBindingsWhereInStrings( string $queryName, @@ -391,7 +391,7 @@ public function testDynamicBindingsWhereInStrings( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testDynamicBindingsOr( string $queryName, @@ -418,7 +418,7 @@ public function testDynamicBindingsOr( } /** - * @dataProvider \Gt\Database\Test\Helper\Helper::queryPathNotExistsProvider() + * @dataProvider \GT\Database\Test\Helper\Helper::queryPathNotExistsProvider() */ public function testPrepareBindingsWithArray( string $queryName, @@ -456,7 +456,7 @@ public function testPrepareBindingsWithArray( ); } - /** @dataProvider \Gt\Database\Test\Helper\Helper::queryPathExistsProvider() */ + /** @dataProvider \GT\Database\Test\Helper\Helper::queryPathExistsProvider() */ public function testMultipleStatements( string $queryName, string $queryCollectionPath, diff --git a/test/phpunit/Result/ResultSetTest.php b/test/phpunit/Result/ResultSetTest.php index 97bb996..6838cfb 100644 --- a/test/phpunit/Result/ResultSetTest.php +++ b/test/phpunit/Result/ResultSetTest.php @@ -1,9 +1,9 @@