Robert Gruendler vor 13 Jahren
Ursprung
Commit
450ed83cef
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 3 3
      Tests/Admin/AdminHelperTest.php
  2. 1 1
      Tests/Controller/AdminHelperTest.php

+ 3 - 3
Tests/Admin/AdminHelperTest.php

@@ -50,11 +50,11 @@ class AdminHelperTest extends \PHPUnit_Framework_TestCase
         $pool = new Pool($container, 'title', 'logo.png');
         $helper = new AdminHelper($pool);
 
-        $formView = new FormView();
+        $formView = new FormView('test');
         $formView->set('id', 'test');
-        $child = new FormView();
+        $child = new FormView('test');
         $child->set('id', 'test_elementId');
-        $formView->setChildren(array('elementId' => $child));
+        $formView->addChild($child);
 
         $this->assertNull($helper->getChildFormView($formView, 'foo'));
         $this->isInstanceOf('Symfony\Component\Form\FormView', $helper->getChildFormView($formView, 'test_elementId'));

+ 1 - 1
Tests/Controller/AdminHelperTest.php

@@ -257,7 +257,7 @@ class AdminHelperTest extends \PHPUnit_Framework_TestCase
 
         $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-        $formView = new FormView();
+        $formView = new FormView('test');
 
         $helper = $this->getMock('Sonata\AdminBundle\Admin\AdminHelper', array('getChildFormView'), array($pool));
         $helper->expects($this->once())->method('getChildFormView')->will($this->returnValue($formView));