function ShareEnvironmentTest::testNoAttribute

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/TestTools/Attribute/ShareEnvironmentTest.php \Drupal\Tests\TestTools\Attribute\ShareEnvironmentTest::testNoAttribute()

Tests that a class declaring nothing does not share its environment.

File

core/tests/Drupal/Tests/TestTools/Attribute/ShareEnvironmentTest.php, line 28

Class

ShareEnvironmentTest
Tests how the ShareEnvironment attribute is resolved.

Namespace

Drupal\Tests\TestTools\Attribute

Code

public function testNoAttribute() : void {
  $this->assertFalse(ShareEnvironment::isEnabledFor(PlainEnvironmentFixture::class));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.