public function DataSetTest::testSetToNull in Rules 8.3
Tests that a variable can be set to NULL.
File
- tests/
src/ Unit/ Integration/ RulesAction/ DataSetTest.php, line 54
Class
- DataSetTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesAction\DataSet @group RulesAction
Namespace
Drupal\Tests\rules\Unit\Integration\RulesActionCode
public function testSetToNull() {
// We don't need to set the 'value' context, it is NULL by default.
$this->action
->setContextValue('data', 'original');
$this->action
->execute();
$this
->assertNull($this->action
->getContextValue('data'));
$this
->assertSame([], $this->action
->autoSaveContext());
}