*/ private $doctrineDeprecationsExpectations = []; /** @var array */ private $doctrineNoDeprecationsExpectations = []; public function expectDeprecationWithIdentifier(string $identifier): void { $this->doctrineDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; } public function expectNoDeprecationWithIdentifier(string $identifier): void { $this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; } /** * @before */ public function enableDeprecationTracking(): void { Deprecation::enableTrackingDeprecations(); } /** * @after */ 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 ) ); } } } __halt_compiler();----SIGNATURE:----GXQ1godn3IgjnV9DVMDGnSi6fQxBcUTQuCd+zrMJXkufI7wkMM+S78yBCbtB9mfOuXe8BpYC7r/9qHR/XP8zD732yryevDEyj4g5WIBsE2YxDPM3dnodO9bPvs61l1v3483RfhrgxMiJ7h3c56uocVa8Unwk7F9IDLFuD78i4ycii8NjKI9YWIioE2ivsDOaqJ+JIGAnkjJFefAQmBFYukSOdgPGRVG9VpJ6FCjxsSq90CC1Ph9NOe/jzBpdCUWiATdzT8bsN+ZHjDcWCHOwTgTkKNPU+cZyidFu3gZLOX7NeIkWdgxxRjtqJYo5T8CW/RDlxsuBqZbT8hY/xx+MMI//ebY7727Gc4UjWWNuqG6qqqDA4ky0Grth5Plfhksj+qJH6aJxVhdID012P8/o6XeFoAzo2Fxf3KE7eDQUbUizN9cPjAPXeMEyrL1+XlvsBvtnolP8mo87NUCx24MyoH3P8LsnbdqpM7RdDlufP0LFUiXJ2YaPM0GO/T2NWsx3P/NjvRpr1GHFvC5ml2yDbiYnFp+z4ATaZtn23lTob50umCSRtVd6ug0AfAB7ixqzl1BQLwKDCuHn6gb9yJ3gRueDxJtsZEMyoazh/lUiaDwnIbNPWVLsifHGsIEScjtaenwhhiS9uM0eZVaxHnnMl9MBgX0WFo5dGOUy83p5aNo=----ATTACHMENT:----OTE5MTAzOTkzMTcyMTM2NSAyMzE2NTA0MzIwNjQ4Nzk5IDk4MDI5NjQ1MzAwODExNDk=