|
@@ -978,6 +978,10 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
->method('getObject')
|
|
|
->will($this->returnValue($object));
|
|
|
|
|
|
+ $this->admin->expects($this->once())
|
|
|
+ ->method('update')
|
|
|
+ ->will($this->returnArgument(0));
|
|
|
+
|
|
|
$this->admin->expects($this->once())
|
|
|
->method('isGranted')
|
|
|
->with($this->equalTo('EDIT'))
|
|
@@ -1063,6 +1067,10 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
->method('getObject')
|
|
|
->will($this->returnValue($object));
|
|
|
|
|
|
+ $this->admin->expects($this->once())
|
|
|
+ ->method('update')
|
|
|
+ ->will($this->returnArgument(0));
|
|
|
+
|
|
|
$this->admin->expects($this->once())
|
|
|
->method('isGranted')
|
|
|
->with($this->equalTo('EDIT'))
|
|
@@ -1261,6 +1269,10 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
->method('getNewInstance')
|
|
|
->will($this->returnValue($object));
|
|
|
|
|
|
+ $this->admin->expects($this->once())
|
|
|
+ ->method('create')
|
|
|
+ ->will($this->returnArgument(0));
|
|
|
+
|
|
|
$form = $this->getMockBuilder('Symfony\Component\Form\Form')
|
|
|
->disableOriginalConstructor()
|
|
|
->getMock();
|
|
@@ -1346,6 +1358,10 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
->method('getNewInstance')
|
|
|
->will($this->returnValue($object));
|
|
|
|
|
|
+ $this->admin->expects($this->once())
|
|
|
+ ->method('create')
|
|
|
+ ->will($this->returnArgument(0));
|
|
|
+
|
|
|
$form = $this->getMockBuilder('Symfony\Component\Form\Form')
|
|
|
->disableOriginalConstructor()
|
|
|
->getMock();
|