lithium\test\Unit::assertNotContainsOnly PHP Метод

assertNotContainsOnly() публичный Метод

$this->assertNotContainsOnly('integer', array('foo', 'bar', 'baz')); // succeeds $this->assertNotContainsOnly('integer', array(1,2,3)); // fails
См. также: lithium\test\Unit::$_internalTypes
См. также: lithium\test\Unit::assert()
public assertNotContainsOnly ( string $type, array | object $haystack, string | boolean $message = '{:message}' ) : boolean
$type string
$haystack array | object Array or iterable object.
$message string | boolean
Результат boolean `true` if the assertion succeeded, `false` otherwise.
    public function assertNotContainsOnly($type, $haystack, $message = '{:message}')
    {
        $method = self::$_internalTypes[$type];
        foreach ($haystack as $key => $value) {
            if (!$method($value)) {
                return $this->assert(true, $message, array('expected' => $type, 'result' => $haystack));
            }
        }
        return $this->assert(false, $message, array('expected' => $type, 'result' => $haystack));
    }