You are here

public function PluginTestBase::testSetProperty in Purge 8.3

Test setting a property.

See also

\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface::setProperty

File

tests/src/Kernel/Invalidation/PluginTestBase.php, line 159

Class

PluginTestBase
Provides an abstract test class to thoroughly test invalidation types.

Namespace

Drupal\Tests\purge\Kernel\Invalidation

Code

public function testSetProperty() : void {
  $i = $this
    ->getInstance();
  $i
    ->setStateContext('purger_d');
  $this
    ->assertSame(NULL, $i
    ->setProperty('my_film', 'Pulp Fiction'));
  $this
    ->assertSame('Pulp Fiction', $i
    ->getProperty('my_film'));
}