瀏覽代碼

Add @group legacy on CRUDControllerTest (#3874)

This will avoid deprecation notice because of the following PR.

https://github.com/sonata-project/SonataAdminBundle/pull/3865
Sullivan SENECHAL 9 年之前
父節點
當前提交
1bd2665fc2
共有 1 個文件被更改,包括 50 次插入0 次删除
  1. 50 0
      Tests/Controller/CRUDControllerTest.php

+ 50 - 0
Tests/Controller/CRUDControllerTest.php

@@ -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));