public function testValidate() { $item = new Item($this->db->getInstance()); $result = $item->validate(array('id' => 1, 'read' => date('Y-m-d H:i:s'), 'starred' => '1', 'test' => 'xyz')); $this->assertArrayHasKey('read', $result); $this->assertArrayHasKey('starred', $result); $this->assertArrayNotHasKey('test', $result); $this->assertEquals(true, $result['starred']); }