소스 검색

Add tests for box_class

Quentin Somazzi 10 년 전
부모
커밋
a1d8affd25
3개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 3
      Resources/doc/reference/action_create_edit.rst
  2. 6 3
      Tests/Form/FormMapperTest.php
  3. 1 0
      Tests/Show/ShowMapperTest.php

+ 3 - 3
Resources/doc/reference/action_create_edit.rst

@@ -64,9 +64,9 @@ To specify options, do as follow:
 Here is an example of what you can do with customizing the box_class on a group
 
 .. figure:: ../images/box_class.png
-    :align: center
-       :alt: Dashboard
-           :width: 500
+   :align: center
+   :alt: Box Class
+   :width: 500
 
 Embedding other Admins
 ----------------------

+ 6 - 3
Tests/Form/FormMapperTest.php

@@ -97,7 +97,8 @@ class FormMapperTest extends \PHPUnit_Framework_TestCase
             'description' => false,
             'translation_domain' => null,
             'fields' => array (),
-            'name' => 'foobar'
+            'name' => 'foobar',
+            'box_class' => 'box box-primary'
         )), $this->admin->getFormGroups());
     }
 
@@ -125,7 +126,8 @@ class FormMapperTest extends \PHPUnit_Framework_TestCase
             'auto_created' => true,
             'groups' => array('foobar'),
             'tab' => true,
-            'name' => 'default'
+            'name' => 'default',
+            'box_class' => 'box box-primary'
         )), $this->admin->getFormTabs());
     }
 
@@ -168,7 +170,8 @@ class FormMapperTest extends \PHPUnit_Framework_TestCase
             'fields' => array(
                 'foo' => 'foo'
             ),
-            'name' => 'foobar'
+            'name' => 'foobar',
+            'box_class' => 'box box-primary'
         )), $this->admin->getFormGroups());
     }
 

+ 1 - 0
Tests/Show/ShowMapperTest.php

@@ -356,6 +356,7 @@ class ShowMapperTest extends \PHPUnit_Framework_TestCase
                 'description' => false,
                 'translation_domain' => null,
                 'name' => 'Group1',
+                'box_class' => 'box box-primary',
                 'fields' => array('fooName3'=>'fooName3', 'fooName2'=>'fooName2', 'fooName1'=>'fooName1', 'fooName4'=>'fooName4'),
             )), true), print_r($this->admin->getShowGroups(), true));
     }