Browse Source

phpcs fixes and another assert for Validation::count()

Florian Krämer 10 years ago
parent
commit
e61f21db33
2 changed files with 4 additions and 1 deletions
  1. 1 1
      src/Validation/Validation.php
  2. 3 0
      tests/TestCase/Validation/ValidationTest.php

+ 1 - 1
src/Validation/Validation.php

@@ -224,7 +224,7 @@ class Validation
      * @param string $operator Can be either a word or operand
      *    is greater >, is less <, greater or equal >=
      *    less or equal <=, is less <, equal to ==, not equal !=
-     * @param int $check2 The expected count value.
+     * @param int $expectedCount The expected count value.
      * @return bool Success
      */
     public static function count($check1, $operator, $expectedCount)

+ 3 - 0
tests/TestCase/Validation/ValidationTest.php

@@ -2787,5 +2787,8 @@ class ValidationTest extends TestCase
 
         $int = 0;
         $this->assertTrue(Validation::count($int, '==', 0));
+
+        $this->assertFalse(Validation::count(null, '==', 0));
+        $this->assertFalse(Validation::count(new \stdClass(), '==', 0));
     }
 }