From 55ba461caed99f37662ac841cdb554e626ee1790 Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Fri, 1 Sep 2023 17:39:09 +0200 Subject: [PATCH] Remove tests --- .github/workflows/ci.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .scrutinizer.yml | 5 +--- composer.json | 3 +-- tests/QueryTest.php | 34 --------------------------- 5 files changed, 4 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33ef306..396559e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: if: matrix.database == 'sqlsrv' - run: mysql -h 127.0.0.1 -u root -ptest -P ${{ job.services.singlestore.ports[3306] }} -e "create database test" if: matrix.database == 'singlestore' - - run: composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }} --ignore-platform-req=ext-oci8 + - run: composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }} - run: cp tests/config/database.ci.php tests/config/database.php - run: | PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "") diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4768f35..71820fd 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -15,5 +15,5 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: 8.2 - - run: composer update --no-interaction --no-progress --prefer-dist --ignore-platform-req=ext-oci8 + - run: composer update --no-interaction --no-progress --prefer-dist - run: vendor/bin/phpstan analyse --error-format=github diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 5a2325a..84343d4 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,9 +1,6 @@ build: environment: - php: - version: 8.2 - pecl_extensions: - - oci8 + php: 8.2 tools: external_code_coverage: runs: 5 diff --git a/composer.json b/composer.json index 03ebad2..349e98a 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,7 @@ "orchestra/testbench": "^8.0", "phpunit/phpunit": "^10.1", "phpstan/phpstan": "^1.10", - "singlestoredb/singlestoredb-laravel": "^1.5.1", - "yajra/laravel-oci8": "^10.0" + "singlestoredb/singlestoredb-laravel": "^1.5.1" }, "autoload": { "psr-4": { diff --git a/tests/QueryTest.php b/tests/QueryTest.php index 72b0c46..1bc340f 100644 --- a/tests/QueryTest.php +++ b/tests/QueryTest.php @@ -9,7 +9,6 @@ use Illuminate\Support\Facades\DB; use Staudenmeir\LaravelCte\DatabaseServiceProvider; use Staudenmeir\LaravelCte\Query\Builder; -use Staudenmeir\LaravelCte\Query\OracleBuilder; use Staudenmeir\LaravelCte\Query\SingleStoreBuilder; class QueryTest extends TestCase @@ -83,19 +82,6 @@ public function testWithExpressionSqlServer() $this->assertEquals($expected, $builder->toSql()); } - public function testWithExpressionOracle() - { - $builder = $this->getBuilder('Oracle'); - $builder->select('u.id') - ->from('u') - ->withExpression('u', $this->getBuilder('Oracle')->from('users')) - ->withExpression('p', $this->getBuilder('Oracle')->from('posts')) - ->join('p', 'p.user_id', '=', 'u.id'); - - $expected = 'with "U" as (select * from "USERS"), "P" as (select * from "POSTS") select "U"."ID" from "U" inner join "P" on "P"."USER_ID" = "U"."ID"'; - $this->assertEquals($expected, $builder->toSql()); - } - public function testWithExpressionSingleStore() { $builder = $this->getBuilder('SingleStore'); @@ -216,25 +202,6 @@ public function testWithRecursiveExpressionSqlServer() $this->assertEquals([3], $builder->getRawBindings()['expressions']); } - public function testWithRecursiveExpressionOracle() - { - $query = $this->getBuilder('Oracle') - ->selectRaw('1') - ->unionAll( - $this->getBuilder('Oracle') - ->selectRaw('number + 1') - ->from('numbers') - ->where('number', '<', 3) - ); - $builder = $this->getBuilder('Oracle'); - $builder->from('numbers') - ->withRecursiveExpression('numbers', $query, ['number']); - - $expected = 'with "NUMBERS" ("NUMBER") as ('.$query->toSql().') select * from "NUMBERS"'; - $this->assertEquals($expected, $builder->toSql()); - $this->assertEquals([3], $builder->getRawBindings()['expressions']); - } - public function testWithRecursiveExpressionSingleStore() { $query = $this->getBuilder('SingleStore') @@ -553,7 +520,6 @@ protected function getBuilder($database) $processor = $this->createMock(Processor::class); return match ($database) { - 'Oracle' => new OracleBuilder($connection, new $grammar(), $processor), 'SingleStore' => new SingleStoreBuilder($connection, new $grammar(), $processor), default => new Builder($connection, new $grammar(), $processor), };