protected function validate() { foreach ($this->getSchema() as $key => $value) { $current = $this->get($key); if ($current instanceof EntityInterface) { $current->validate(); } else { Tools::validate($key, $current, $value, $this->isRequired($key), $this->getCalledEntityName()); } } return true; }
public function testSucessoComUsoDeDadosValidos() { $this->assertTrue(Tools::validate('foo', 3456, 'integer', true)); }