|
@@ -234,7 +234,6 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
$this->csrfProvider->expects($this->any())
|
|
$this->csrfProvider->expects($this->any())
|
|
->method('isTokenValid')
|
|
->method('isTokenValid')
|
|
->will($this->returnCallback(function (CsrfToken $token) {
|
|
->will($this->returnCallback(function (CsrfToken $token) {
|
|
-
|
|
|
|
if ($token->getValue() == 'csrf-token-123_'.$token->getId()) {
|
|
if ($token->getValue() == 'csrf-token-123_'.$token->getId()) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -774,8 +773,8 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
$modelManager->expects($this->once())
|
|
$modelManager->expects($this->once())
|
|
->method('batchDelete')
|
|
->method('batchDelete')
|
|
->will($this->returnCallback(function () {
|
|
->will($this->returnCallback(function () {
|
|
- throw new ModelManagerException();
|
|
|
|
- }));
|
|
|
|
|
|
+ throw new ModelManagerException();
|
|
|
|
+ }));
|
|
|
|
|
|
$this->admin->expects($this->once())
|
|
$this->admin->expects($this->once())
|
|
->method('getModelManager')
|
|
->method('getModelManager')
|
|
@@ -1145,8 +1144,8 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
$this->admin->expects($this->once())
|
|
$this->admin->expects($this->once())
|
|
->method('delete')
|
|
->method('delete')
|
|
->will($this->returnCallback(function () {
|
|
->will($this->returnCallback(function () {
|
|
- throw new ModelManagerException();
|
|
|
|
- }));
|
|
|
|
|
|
+ throw new ModelManagerException();
|
|
|
|
+ }));
|
|
|
|
|
|
$this->kernel->expects($this->once())
|
|
$this->kernel->expects($this->once())
|
|
->method('isDebug')
|
|
->method('isDebug')
|
|
@@ -3680,8 +3679,8 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
$subject->expects($this->once())
|
|
$subject->expects($this->once())
|
|
->method($method)
|
|
->method($method)
|
|
->will($this->returnCallback(function () use ($exception) {
|
|
->will($this->returnCallback(function () use ($exception) {
|
|
- throw $exception;
|
|
|
|
- }));
|
|
|
|
|
|
+ throw $exception;
|
|
|
|
+ }));
|
|
|
|
|
|
$this->logger->expects($this->once())
|
|
$this->logger->expects($this->once())
|
|
->method('error')
|
|
->method('error')
|