*/ 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:----ZTe6CYCXY11Xq6PC6vBC9c0MXoqN77v5Lqx0AcyvUy6u15DnKT7O9wkgmfFXDLqVSJa3uxrRTg9Llj428RFO9ti5Qi9HQA5GMkrdI4/eNL45FLACAvvh0pfEadT7ewyLGa4q51eS6uSVt8p3wbfNgRtStErEE7PE2tKr3jjOy7mhQsBqm7lHQB7gcGfpvvRIBxoNH3YQjUigTUAM2yhC+J4WYvzGfxUZ9jThnhoUY5qubVa2Xdqo9/kUKqm4Kj8NzaK/UHM0sDzEMPS4T4PQbbc04lNMW2zVxaQXpkJGbQdIej6SpPeuomfVkbZLthEzDnQi04j/lNvXKNzCfbHIu7H5XrEt0MfW9WBnxe3YumKjMgkegGyTWiYe71+In5D+3HjKXBYtOETkYjM4zNar3Z0/YgkD93hHURwaRiDUpNJG8cx9BgDcflLnMNQLmJ/HWMM1iVYMPruqtju7beGNPXISOWqM3iikNOtkK+dnaE10Nwh8O07dnJZ1aOhjTueuPh5IFuX0IwONbIcfyJcS8gfGzx3Rfrfgy8GCG8VJcKQx0F2Z/pA0JfPIzE2pN4EwOduJO2nrAanM0aRnbOezOnLVY3/AHf/fkf8WpvfFtlCwBjY7OfE8nOCtFf2j9zbWsYAkEXTAkFb/MPbnvPLNB9XVCpKvva0SUM869yJN7Oo=----ATTACHMENT:----Mzg4NjkxNDMwNTA4NDcwNCA3MDgxOTMxOTgwNzcxODcyIDI0ODgyOTY1MTAxNzEwMzI=