function JsonApiDocumentTopLevelNormalizerTest::tearDown

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php \Drupal\Tests\jsonapi\Kernel\Normalizer\JsonApiDocumentTopLevelNormalizerTest::tearDown()
  2. 10 core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php \Drupal\Tests\jsonapi\Kernel\Normalizer\JsonApiDocumentTopLevelNormalizerTest::tearDown()
  3. 11.x core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php \Drupal\Tests\jsonapi\Kernel\Normalizer\JsonApiDocumentTopLevelNormalizerTest::tearDown()

Overrides KernelTestBase::tearDown

File

core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php, line 186

Class

JsonApiDocumentTopLevelNormalizerTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\Normalizer

Code

public function tearDown() {
    if ($this->node) {
        $this->node
            ->delete();
    }
    if ($this->term1) {
        $this->term1
            ->delete();
    }
    if ($this->term2) {
        $this->term2
            ->delete();
    }
    if ($this->vocabulary) {
        $this->vocabulary
            ->delete();
    }
    if ($this->user) {
        $this->user
            ->delete();
    }
    if ($this->user2) {
        $this->user2
            ->delete();
    }
}

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