Browse Source

Merge pull request #5283 from bcrowe/3.0-collection-msg

Fix Collection exception message
Mark Story 11 years ago
parent
commit
8453ca5af8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Collection/Collection.php
  2. 1 1
      tests/TestCase/Collection/CollectionTest.php

+ 1 - 1
src/Collection/Collection.php

@@ -41,7 +41,7 @@ class Collection extends IteratorIterator implements CollectionInterface {
 		}
 
 		if (!($items instanceof \Traversable)) {
-			$msg = 'Only array or \Traversable are allowed for Collection';
+			$msg = 'Only an array or \Traversable is allowed for Collection';
 			throw new InvalidArgumentException($msg);
 		}
 

+ 1 - 1
tests/TestCase/Collection/CollectionTest.php

@@ -517,7 +517,7 @@ class CollectionTest extends TestCase {
  * Tests that only arrays and Traversables are allowed in the constructor
  *
  * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Only array or \Traversable are allowed for Collection
+ * @expectedExceptionMessage Only an array or \Traversable is allowed for Collection
  * @return void
  */
 	public function testInvalidConstructorArgument() {