@@ -85,27 +85,6 @@ public function constructorErrorProvider() {
8585 );
8686 }
8787
88- public function testHasClaim () {
89- $ claims = new Claims ();
90- $ claim1 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P15 ' ) ) );
91- $ claim2 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P16 ' ) ) );
92-
93- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim1 ) );
94- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim2 ) );
95-
96- $ claims ->addClaim ( $ claim1 );
97- $ this ->assertTrue ( $ claims ->hasClaim ( $ claim1 ) );
98- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim2 ) );
99-
100- $ claims ->addClaim ( $ claim2 );
101- $ this ->assertTrue ( $ claims ->hasClaim ( $ claim1 ) );
102- $ this ->assertTrue ( $ claims ->hasClaim ( $ claim2 ) );
103-
104- // no guid
105- $ claim0 = new Claim ( new PropertyNoValueSnak ( new PropertyId ( 'P15 ' ) ) );
106- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim0 ) );
107- }
108-
10988 public function testHasClaimWithGuid () {
11089 $ claims = new Claims ();
11190 $ claim1 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P15 ' ) ) );
@@ -133,13 +112,9 @@ public function testRemoveClaimWithGuid() {
133112 $ this ->assertSame ( 2 , $ claims ->count () );
134113
135114 $ claims ->removeClaimWithGuid ( $ claim1 ->getGuid () );
136- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim1 ) );
137- $ this ->assertNull ( $ claims ->getClaimWithGuid ( $ claim1 ->getGuid () ) );
138115 $ this ->assertSame ( 1 , $ claims ->count () );
139116
140117 $ claims ->removeClaimWithGuid ( $ claim2 ->getGuid () );
141- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim2 ) );
142- $ this ->assertNull ( $ claims ->getClaimWithGuid ( $ claim2 ->getGuid () ) );
143118 $ this ->assertSame ( 0 , $ claims ->count () );
144119 }
145120
@@ -153,13 +128,9 @@ public function testOffsetUnset() {
153128 $ this ->assertSame ( 2 , $ claims ->count () );
154129
155130 $ claims ->offsetUnset ( $ claim1 ->getGuid () );
156- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim1 ) );
157- $ this ->assertNull ( $ claims ->getClaimWithGuid ( $ claim1 ->getGuid () ) );
158131 $ this ->assertSame ( 1 , $ claims ->count () );
159132
160133 $ claims ->offsetUnset ( $ claim2 ->getGuid () );
161- $ this ->assertFalse ( $ claims ->hasClaim ( $ claim2 ) );
162- $ this ->assertNull ( $ claims ->getClaimWithGuid ( $ claim2 ->getGuid () ) );
163134 $ this ->assertSame ( 0 , $ claims ->count () );
164135 }
165136
0 commit comments