|
@@ -3217,6 +3217,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->controller->batchAction($this->request);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionActionNotDefined()
|
|
|
{
|
|
|
$this->setExpectedException('RuntimeException', 'The `foo` batch action is not defined');
|
|
@@ -3248,6 +3253,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionMethodNotExist()
|
|
|
{
|
|
|
$this->setExpectedException('RuntimeException', 'A `Sonata\AdminBundle\Controller\CRUDController::batchActionFoo` method must be callable');
|
|
@@ -3270,6 +3280,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->controller->batchAction($this->request);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionWithoutConfirmation()
|
|
|
{
|
|
|
$batchActions = array('delete' => array('label' => 'Foo Bar', 'ask_confirmation' => false));
|
|
@@ -3320,6 +3335,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('list?', $result->getTargetUrl());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionWithoutConfirmation2()
|
|
|
{
|
|
|
$batchActions = array('delete' => array('label' => 'Foo Bar', 'ask_confirmation' => false));
|
|
@@ -3371,6 +3391,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('list?', $result->getTargetUrl());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionWithConfirmation()
|
|
|
{
|
|
|
$batchActions = array('delete' => array('label' => 'Foo Bar', 'translation_domain' => 'FooBarBaz', 'ask_confirmation' => true));
|
|
@@ -3425,6 +3450,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('SonataAdminBundle:CRUD:batch_confirmation.html.twig', $this->template);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionNonRelevantAction()
|
|
|
{
|
|
|
$controller = new BatchAdminController();
|
|
@@ -3454,6 +3484,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('list?', $result->getTargetUrl());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionNonRelevantAction2()
|
|
|
{
|
|
|
$controller = new BatchAdminController();
|
|
@@ -3483,6 +3518,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('list?', $result->getTargetUrl());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionNoItems()
|
|
|
{
|
|
|
$batchActions = array('delete' => array('label' => 'Foo Bar', 'ask_confirmation' => true));
|
|
@@ -3509,6 +3549,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('list?', $result->getTargetUrl());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionNoItemsEmptyQuery()
|
|
|
{
|
|
|
$controller = new BatchAdminController();
|
|
@@ -3552,6 +3597,11 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertSame('batchActionBar executed', $result->getContent());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * NEXT_MAJOR: Remove this legacy group.
|
|
|
+ *
|
|
|
+ * @group legacy
|
|
|
+ */
|
|
|
public function testBatchActionWithRequesData()
|
|
|
{
|
|
|
$batchActions = array('delete' => array('label' => 'Foo Bar', 'ask_confirmation' => false));
|