@@ -33,21 +33,20 @@ public function requiredProvider()
33
33
34
34
// Simple field, not nullable
35
35
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
36
- $ classMetadata ->expects ( $ this -> once ())-> method ( ' hasField ' )-> with ( ' field ')-> will ( $ this -> returnValue ( true )) ;
36
+ $ classMetadata ->fieldMappings [ ' field '] = true ;
37
37
$ classMetadata ->expects ($ this ->once ())->method ('isNullable ' )->with ('field ' )->will ($ this ->returnValue (false ));
38
38
39
39
$ return [] = array ($ classMetadata , new ValueGuess (true , Guess::HIGH_CONFIDENCE ));
40
40
41
41
// Simple field, nullable
42
42
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
43
- $ classMetadata ->expects ( $ this -> once ())-> method ( ' hasField ' )-> with ( ' field ')-> will ( $ this -> returnValue ( true )) ;
43
+ $ classMetadata ->fieldMappings [ ' field '] = true ;
44
44
$ classMetadata ->expects ($ this ->once ())->method ('isNullable ' )->with ('field ' )->will ($ this ->returnValue (true ));
45
45
46
46
$ return [] = array ($ classMetadata , new ValueGuess (false , Guess::MEDIUM_CONFIDENCE ));
47
47
48
48
// One-to-one, nullable (by default)
49
49
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
50
- $ classMetadata ->expects ($ this ->once ())->method ('hasField ' )->with ('field ' )->will ($ this ->returnValue (false ));
51
50
$ classMetadata ->expects ($ this ->once ())->method ('isAssociationWithSingleJoinColumn ' )->with ('field ' )->will ($ this ->returnValue (true ));
52
51
53
52
$ mapping = array ('joinColumns ' => array (array ()));
@@ -57,7 +56,6 @@ public function requiredProvider()
57
56
58
57
// One-to-one, nullable (explicit)
59
58
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
60
- $ classMetadata ->expects ($ this ->once ())->method ('hasField ' )->with ('field ' )->will ($ this ->returnValue (false ));
61
59
$ classMetadata ->expects ($ this ->once ())->method ('isAssociationWithSingleJoinColumn ' )->with ('field ' )->will ($ this ->returnValue (true ));
62
60
63
61
$ mapping = array ('joinColumns ' => array (array ('nullable ' => true )));
@@ -67,7 +65,6 @@ public function requiredProvider()
67
65
68
66
// One-to-one, not nullable
69
67
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
70
- $ classMetadata ->expects ($ this ->once ())->method ('hasField ' )->with ('field ' )->will ($ this ->returnValue (false ));
71
68
$ classMetadata ->expects ($ this ->once ())->method ('isAssociationWithSingleJoinColumn ' )->with ('field ' )->will ($ this ->returnValue (true ));
72
69
73
70
$ mapping = array ('joinColumns ' => array (array ('nullable ' => false )));
@@ -77,7 +74,6 @@ public function requiredProvider()
77
74
78
75
// One-to-many, no clue
79
76
$ classMetadata = $ this ->getMockBuilder ('Doctrine\ORM\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
80
- $ classMetadata ->expects ($ this ->once ())->method ('hasField ' )->with ('field ' )->will ($ this ->returnValue (false ));
81
77
$ classMetadata ->expects ($ this ->once ())->method ('isAssociationWithSingleJoinColumn ' )->with ('field ' )->will ($ this ->returnValue (false ));
82
78
83
79
$ return [] = array ($ classMetadata , null );
0 commit comments