/** * The MagicDb::validates function should return if the array passed to it or the local db property contains a valid MagicDb record set * * @access public */ function testValidates() { $r = $this->Db->validates(array()); $this->assertTrue($r === false); $r = $this->Db->validates(array('header' => true, 'database' => true)); $this->assertTrue($r === false); $magicDb = array('header' => array(), 'database' => array()); $r = $this->Db->validates($magicDb); $this->assertTrue($r === true); $this->Db->db = array(); $r = $this->Db->validates(); $this->assertTrue($r === false); $this->Db->db = $magicDb; $r = $this->Db->validates(); $this->assertTrue($r === true); }