Kaynağa Gözat

Tests for createAction updated accordingly to new behavior

Andrey Danciger 11 yıl önce
ebeveyn
işleme
6ce33df9c6
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      Tests/Controller/CRUDControllerTest.php

+ 2 - 2
Tests/Controller/CRUDControllerTest.php

@@ -1250,7 +1250,7 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
 
 
     public function testCreateActionSuccess()
     public function testCreateActionSuccess()
     {
     {
-        $this->admin->expects($this->once())
+        $this->admin->expects($this->exactly(2))
             ->method('isGranted')
             ->method('isGranted')
             ->with($this->equalTo('CREATE'))
             ->with($this->equalTo('CREATE'))
             ->will($this->returnValue(true));
             ->will($this->returnValue(true));
@@ -1335,7 +1335,7 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
 
 
     public function testCreateActionAjaxSuccess()
     public function testCreateActionAjaxSuccess()
     {
     {
-        $this->admin->expects($this->once())
+        $this->admin->expects($this->exactly(2))
             ->method('isGranted')
             ->method('isGranted')
             ->with($this->equalTo('CREATE'))
             ->with($this->equalTo('CREATE'))
             ->will($this->returnValue(true));
             ->will($this->returnValue(true));