|
@@ -119,30 +119,8 @@ class ListMapperTest extends \PHPUnit_Framework_TestCase
|
|
$this->assertEquals('fooName', $fieldDescription->getOption('label'));
|
|
$this->assertEquals('fooName', $fieldDescription->getOption('label'));
|
|
}
|
|
}
|
|
|
|
|
|
- public function testAddViewInlineActionException()
|
|
|
|
- {
|
|
|
|
- set_error_handler('PHPUnit_Util_ErrorHandler::handleError');
|
|
|
|
-
|
|
|
|
- $this->setExpectedException('PHPUnit_Framework_Error', 'Inline action "view" is deprecated since version 2.2.4. Use inline action "show" instead.');
|
|
|
|
-
|
|
|
|
- try {
|
|
|
|
- $this->assertFalse($this->listMapper->has('_action'));
|
|
|
|
- $this->listMapper->add('_action', 'actions', array('actions' => array('view' => array())));
|
|
|
|
- } catch (\PHPUnit_Framework_Error $e) {
|
|
|
|
- restore_error_handler();
|
|
|
|
-
|
|
|
|
- if ('Inline action "view" is deprecated since version 2.2.4. Use inline action "show" instead.' === $e->getMessage()) {
|
|
|
|
- throw $e;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- restore_error_handler();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public function testAddViewInlineAction()
|
|
public function testAddViewInlineAction()
|
|
{
|
|
{
|
|
- $terminateErrorIgnore = \PHPUnit_Util_ErrorHandler::handleErrorOnce(E_USER_DEPRECATED);
|
|
|
|
-
|
|
|
|
$this->assertFalse($this->listMapper->has('_action'));
|
|
$this->assertFalse($this->listMapper->has('_action'));
|
|
$this->listMapper->add('_action', 'actions', array('actions' => array('view' => array())));
|
|
$this->listMapper->add('_action', 'actions', array('actions' => array('view' => array())));
|
|
|
|
|
|
@@ -154,8 +132,6 @@ class ListMapperTest extends \PHPUnit_Framework_TestCase
|
|
$this->assertEquals('_action', $fieldDescription->getName());
|
|
$this->assertEquals('_action', $fieldDescription->getName());
|
|
$this->assertCount(1, $fieldDescription->getOption('actions'));
|
|
$this->assertCount(1, $fieldDescription->getOption('actions'));
|
|
$this->assertEquals(array('show' => array()), $fieldDescription->getOption('actions'));
|
|
$this->assertEquals(array('show' => array()), $fieldDescription->getOption('actions'));
|
|
-
|
|
|
|
- $terminateErrorIgnore();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public function testAddRemove()
|
|
public function testAddRemove()
|