function NodeMakeUnstickyTest::testActionExecution
Tests the action execution.
@covers ::execute
File
-
tests/
src/ Unit/ Integration/ RulesAction/ NodeMakeUnstickyTest.php, line 44
Class
- NodeMakeUnstickyTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesAction\NodeMakeUnsticky @group RulesAction
Namespace
Drupal\Tests\rules\Unit\Integration\RulesActionCode
public function testActionExecution() {
$node = $this->prophesizeEntity(NodeInterface::class);
$node->setSticky(NodeInterface::NOT_STICKY)
->shouldBeCalledTimes(1);
$this->action
->setContextValue('node', $node->reveal());
$this->action
->execute();
$this->assertEquals([
'node',
], $this->action
->autoSaveContext(), 'Action returns the user context name for auto saving.');
}