Browse Source

Add test for #13509

I wasn't able to reproduce the problem.
Mark Story 6 years ago
parent
commit
1cd1aed962
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tests/TestCase/Database/QueryTest.php

+ 8 - 0
tests/TestCase/Database/QueryTest.php

@@ -4055,6 +4055,14 @@ class QueryTest extends TestCase
         $query = new Query($this->connection);
         $sql = $query->select('*')->join(['foo' => $query->newExpr('bar')])->sql();
         $this->assertQuotedQuery('JOIN \(bar\) <foo>', $sql);
+
+        $query = new Query($this->connection);
+        $sql = $query->select('*')->join([
+            'alias' => 'orders',
+            'table' => 'Order',
+            'conditions' => ['1 = 1'],
+        ])->sql();
+        $this->assertQuotedQuery('JOIN <Order> <orders> ON 1 = 1', $sql);
     }
 
     /**