public function ServiceTestTrait::testCodeContract in Purge 8.3
Test for \Drupal\purge\ServiceBase and \Drupal\purge\ServiceInterface.
Services not derived from \Drupal\purge\ServiceInterface, should overload this test. This applies to plugin managers for instance.
File
- tests/
src/ Traits/ ServiceTestTrait.php, line 65
Class
- ServiceTestTrait
- Properties and methods for services.yml exposed classes.
Namespace
Drupal\Tests\purge\TraitsCode
public function testCodeContract() : void {
$this
->assertTrue($this->service instanceof ServiceInterface);
$this
->assertTrue($this->service instanceof ServiceBase);
}