Browse Source

Add a little test

Benjamin Lévêque 13 years ago
parent
commit
91f46cee3a
1 changed files with 18 additions and 0 deletions
  1. 18 0
      Tests/Form/Type/DateTimeRangeTypeTest.php

+ 18 - 0
Tests/Form/Type/DateTimeRangeTypeTest.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace Sonata\AdminBundle\Tests\Form\Type;
+
+use Sonata\AdminBundle\Form\Type\Filter\DateTimeRangeType;
+use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
+
+class DateTimeRangeTypeTest extends TypeTestCase
+{
+    public function testGetDefaultOptions()
+    {
+        $stub = $this->getMock('Symfony\Component\Translation\TranslatorInterface');
+
+        $formType = new DateTimeRangeType($stub);
+
+        $this->assertTrue(is_array($formType->getDefaultOptions()));
+    }
+}