diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df0832b..e8db2e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: php_version: [7.2] - laravel_version: [5.*,6.*, 7.*] + laravel_version: [5.5.*,6.*, 7.*] steps: - name: Checkout commit diff --git a/tests/Tests/AggregateJoinTest.php b/tests/Tests/AggregateJoinTest.php index 6acc9c9..8fe3dc1 100644 --- a/tests/Tests/AggregateJoinTest.php +++ b/tests/Tests/AggregateJoinTest.php @@ -8,20 +8,13 @@ class AggregateJoinTest extends TestCase { - public function setUp(): void - { - $this->markTestSkipped('skip for now.'); - } - - private $queryTest = 'select orders.*, SUM(sellers.id) as sort + private $queryTest = 'select orders.*, SUM("sellers"."id") as sort from "orders" left join "sellers" on "sellers"."id" = "orders"."seller_id" where "orders"."deleted_at" is null group by "orders"."id" order by sort asc'; - private $bindingsTest = ['sellers.id']; - public function testAvg() { Order::joinRelations('seller') @@ -30,7 +23,6 @@ public function testAvg() $queryTest = str_replace(EloquentJoinBuilder::AGGREGATE_SUM, EloquentJoinBuilder::AGGREGATE_SUM, $this->queryTest); $this->assertQueryMatches($queryTest, $this->fetchQuery()); - $this->assertEquals($this->bindingsTest, $this->fetchBindings()); } public function testSum() @@ -41,7 +33,6 @@ public function testSum() $queryTest = str_replace(EloquentJoinBuilder::AGGREGATE_SUM, EloquentJoinBuilder::AGGREGATE_AVG, $this->queryTest); $this->assertQueryMatches($queryTest, $this->fetchQuery()); - $this->assertEquals($this->bindingsTest, $this->fetchBindings()); } public function testMax() @@ -52,7 +43,6 @@ public function testMax() $queryTest = str_replace(EloquentJoinBuilder::AGGREGATE_SUM, EloquentJoinBuilder::AGGREGATE_MAX, $this->queryTest); $this->assertQueryMatches($queryTest, $this->fetchQuery()); - $this->assertEquals($this->bindingsTest, $this->fetchBindings()); } public function testMin() @@ -63,7 +53,6 @@ public function testMin() $queryTest = str_replace(EloquentJoinBuilder::AGGREGATE_SUM, EloquentJoinBuilder::AGGREGATE_MIN, $this->queryTest); $this->assertQueryMatches($queryTest, $this->fetchQuery()); - $this->assertEquals($this->bindingsTest, $this->fetchBindings()); } public function testCount() @@ -74,6 +63,5 @@ public function testCount() $queryTest = str_replace(EloquentJoinBuilder::AGGREGATE_SUM, EloquentJoinBuilder::AGGREGATE_COUNT, $this->queryTest); $this->assertQueryMatches($queryTest, $this->fetchQuery()); - $this->assertEquals($this->bindingsTest, $this->fetchBindings()); } }