Browse Source

Fix typo and failing test.

mark_story 11 years ago
parent
commit
9fffa4799f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Collection/CollectionTrait.php
  2. 1 1
      tests/TestCase/ORM/QueryTest.php

+ 1 - 1
src/Collection/CollectionTrait.php

@@ -656,7 +656,7 @@ trait CollectionTrait {
  * [
  *	1 => 'foo',
  *	2 => 'bar',
- *	3 => 'baz,
+ *	3 => 'baz',
  * ];
  *
  * $combined = (new Collection($items))->combine('id', 'name', 'parent');

+ 1 - 1
tests/TestCase/ORM/QueryTest.php

@@ -2060,7 +2060,7 @@ class QueryTest extends TestCase {
 			->autoFields(true)
 			->hydrate(false)
 			->contain(['Authors' => function($q) {
-				return $q->select(['compute' => '2 + 20'])
+				return $q->select(['compute' => '(SELECT 2 + 20)'])
 					->autoFields(true);
 			}])
 			->first();