瀏覽代碼

Revert "Added doc & unit tests"

This reverts commit 9c88fcc10acd8fffec42fab20b45ede9b7fa4289.
Thomas Rabaix 11 年之前
父節點
當前提交
50dc395107
共有 2 個文件被更改,包括 0 次插入19 次删除
  1. 0 9
      Resources/doc/reference/form_types.rst
  2. 0 10
      Tests/Admin/BaseFieldDescriptionTest.php

+ 0 - 9
Resources/doc/reference/form_types.rst

@@ -287,15 +287,6 @@ General
         <?php
         $form->add('status', null, array('label' => false);
 
-- ``code``: You can set the ``code`` option to a closure if you want to customize the value returned (will take the object as a parameter).
-
-.. code-block:: php
-
-        <?php
-        $form->add('status', null, array('code' => function ($objectWithStatus) {
-            return sprintf("Status: %s", $objectWithStatus->getStatus());
-        });
-
 .. _`Symfony field types`: http://symfony.com/doc/current/book/forms.html#built-in-field-types
 .. _`Symfony choice Field Type docs`: http://symfony.com/doc/current/reference/forms/types/choice.html
 .. _`Symfony PropertyPath`: http://api.symfony.com/2.0/Symfony/Component/Form/Util/PropertyPath.html

+ 0 - 10
Tests/Admin/BaseFieldDescriptionTest.php

@@ -95,16 +95,6 @@ class BaseFieldDescriptionTest extends \PHPUnit_Framework_TestCase
     }
 
     public function testGetValue()
-    {
-        $description = new FieldDescription();
-
-        $mock = $this->getMock('stdClass', array('getFake'));
-        $mock->expects($this->once())->method('getFake')->will($this->returnValue(42));
-
-        $this->assertEquals(42, $description->getFieldValue($mock, 'fake'));
-    }
-
-    public function testGetValueCode()
     {
         $description = new FieldDescription();
         $description->setOption('code', 'getFoo');