Exemplo n.º 1
0
 public function testGetDefaultOptions()
 {
     $type = new DateRangeType($this->getMock('Symfony\\Component\\Translation\\TranslatorInterface'));
     $this->assertEquals('sonata_type_date_range', $type->getName());
     FormHelper::configureOptions($type, $resolver = new OptionsResolver());
     $options = $resolver->resolve();
     $this->assertEquals(array('field_options' => array(), 'field_options_start' => array(), 'field_options_end' => array(), 'field_type' => 'date'), $options);
 }
Exemplo n.º 2
0
 public function testGetDefaultOptions()
 {
     $type = new DateRangeType($this->getMock('Symfony\\Component\\Translation\\TranslatorInterface'));
     $this->assertEquals('sonata_type_date_range', $type->getName());
     $resolver = new OptionsResolver();
     $type->setDefaultOptions($resolver);
     $options = $resolver->resolve();
     $this->assertEquals(array('field_options' => array()), $options);
 }