protected function FixtureBase::save in Lightning Core 8.3
Same name and namespace in other branches
- 8.5 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::save()
- 8.4 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::save()
Saves an entity and marks it for automatic deletion.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to save.
See also
::tearDown()
1 call to FixtureBase::save()
- FixtureContext::setUp in tests/
src/ FixtureContext.php - @BeforeScenario
File
- tests/
src/ FixtureBase.php, line 141
Class
- FixtureBase
- Base class for contexts which set up and tear down a complete test fixture.
Namespace
Drupal\Tests\lightning_coreCode
protected function save(EntityInterface $entity) {
$entity
->save();
array_push($this->entities, $entity);
}