TimeStampItemNormalizerTraitDeprecatedTest.php

Namespace

Drupal\Tests\serialization\Unit\Normalizer

File

core/modules/serialization/tests/src/Unit/Normalizer/TimeStampItemNormalizerTraitDeprecatedTest.php

View source
<?php

namespace Drupal\Tests\serialization\Unit\Normalizer;

use Drupal\serialization_test\TimeStampItemNormalizerTraitDeprecatedTestClass;
use Drupal\Tests\UnitTestCase;

/**
 * Tests that TimeStampItemNormalizerTrait throws a deprecation error.
 *
 * @group serialization
 * @group legacy
 * @coversDefaultClass \Drupal\serialization\Normalizer\TimeStampItemNormalizerTrait
 */
class TimeStampItemNormalizerTraitDeprecatedTest extends UnitTestCase {
    
    /**
     * Tests that TimeStampItemNormalizerTrait throws a deprecation error.
     *
     * @expectedDeprecation Drupal\serialization\Normalizer\TimeStampItemNormalizerTrait is deprecated in Drupal 8.7.0 and will be removed in Drupal 9.0.0. Use \Drupal\serialization\Normalizer\TimestampNormalizer instead.
     */
    public function testDeprecated() {
        $test = new TimeStampItemNormalizerTraitDeprecatedTestClass();
    }

}

Classes

Title Deprecated Summary
TimeStampItemNormalizerTraitDeprecatedTest Tests that TimeStampItemNormalizerTrait throws a deprecation error.

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