public function EntitySaveTest::testActionExecutionPostponed in Rules 8.3
Tests the action execution when saving is postponed.
@covers ::execute
File
- tests/
src/ Unit/ Integration/ RulesAction/ EntitySaveTest.php, line 68
Class
- EntitySaveTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesAction\EntitySave @group RulesAction
Namespace
Drupal\Tests\rules\Unit\Integration\RulesActionCode
public function testActionExecutionPostponed() {
$this->entity
->save()
->shouldNotBeCalled();
$this->action
->setContextValue('entity', $this->entity
->reveal());
$this->action
->execute();
$this
->assertEquals($this->action
->autoSaveContext(), [
'entity',
], 'Action returns the entity context name for auto saving.');
}