44
55namespace Doctrine \Tests \ORM \Mapping ;
66
7- use Doctrine \Deprecations \PHPUnit \VerifyDeprecations ;
87use Doctrine \ORM \Mapping \DefaultNamingStrategy ;
98use Doctrine \ORM \Mapping \JoinTableMapping ;
109use Doctrine \ORM \Mapping \ManyToManyOwningSideMapping ;
10+ use Doctrine \ORM \Mapping \MappingException ;
1111use PHPUnit \Framework \Attributes \DataProvider ;
12- use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
1312use PHPUnit \Framework \TestCase ;
1413
1514use function assert ;
1817
1918final class ManyToManyOwningSideMappingTest extends TestCase
2019{
21- use VerifyDeprecations;
22-
2320 public function testItSurvivesSerialization (): void
2421 {
2522 $ mapping = new ManyToManyOwningSideMapping (
@@ -44,20 +41,15 @@ public function testItSurvivesSerialization(): void
4441
4542 /** @param array<string,mixed> $mappingArray */
4643 #[DataProvider('mappingsProvider ' )]
47- #[WithoutErrorHandler]
4844 public function testNullableDefaults (
49- bool $ expectDeprecation ,
45+ bool $ expectException ,
5046 bool $ expectedValue ,
5147 array $ mappingArray ,
5248 ): void {
5349 $ namingStrategy = new DefaultNamingStrategy ();
54- if ($ expectDeprecation ) {
55- $ this ->expectDeprecationWithIdentifier (
56- 'https://github/doctrine/orm/pull/12125 ' ,
57- );
58- } else {
59- $ this ->expectNoDeprecationWithIdentifier (
60- 'https://github/doctrine/orm/pull/12125 ' ,
50+ if ($ expectException ) {
51+ $ this ->expectException (
52+ MappingException::class,
6153 );
6254 }
6355
0 commit comments