Ejemplo n.º 1
0
 protected function createFixture(array $data = array())
 {
     $person = new Person('Scheit', '*****@*****.**', 'Philipp', Date::create('21.11.1984'));
     $formPanel = new EntityFormPanel('Person bearbeiten', $this->getTranslationContainer(), new EntityForm($person, $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Person')->getSaveRequestMeta($person)));
     $formPanel->createComponents();
     $validator = new ComponentsValidator(new Set(array_merge(array('id' => '17', 'birthday' => '21.11.1984', 'name' => 'Scheit', 'firstName' => 'Philipp ', 'email' => '*****@*****.**', 'yearKnown' => 'true'), $data), $person->getSetMeta()), $formPanel->getEntityForm()->getComponents());
     return $validator;
 }
Ejemplo n.º 2
0
 public function provideValidData()
 {
     return array(array('12.02.2012', Date::create('12.02.2012'), new DateValidatorRule('d.m.Y')), array('12.02.2012', Date::create('12.02.2012'), new DateValidatorRule('d.m.Y')), array('29.02.2012', Date::create('29.02.2012'), new DateValidatorRule('d.m.Y')), array('29.02.', Date::create('29.02.1972'), new DateValidatorRule('d.m.')), array('28.02.', Date::create('28.02.1970'), new DateValidatorRule('d.m.')));
 }