public function LogCRUDTest::testDeleteLog in Log entity 2.x
Delete log entity.
File
- tests/
src/ Functional/ LogCRUDTest.php, line 94
Class
- LogCRUDTest
- Tests the Log CRUD.
Namespace
Drupal\Tests\log\FunctionalCode
public function testDeleteLog() {
$log = $this
->createLogEntity();
$log
->save();
$label = $log
->getName();
$log_id = $log
->id();
$this
->drupalPostForm($log
->toUrl('delete-form'), [], $this
->t('Delete'));
$this
->assertRaw($this
->t('The @entity-type %label has been deleted.', [
'@entity-type' => $log
->getEntityType()
->getSingularLabel(),
'%label' => $label,
]));
$this
->assertNull($this->storage
->load($log_id));
}