Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VerifyDeprecations.php

function VerifyDeprecations::verifyDeprecationsAreTriggered

@after

File

vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php, line 40

Class

VerifyDeprecations

Namespace

Doctrine\Deprecations\PHPUnit

Code

public function verifyDeprecationsAreTriggered() : void {
    foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) {
        $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
        $this->assertTrue($actualCount > $expectation, sprintf("Expected deprecation with identifier '%s' was not triggered by code executed in test.", $identifier));
    }
    foreach ($this->doctrineNoDeprecationsExpectations as $identifier => $expectation) {
        $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
        $this->assertTrue($actualCount === $expectation, sprintf("Expected deprecation with identifier '%s' was triggered by code executed in test, but expected not to.", $identifier));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal