@@ -237,38 +237,14 @@ public function testAddClaim() {
237237 // Insert claim at the beginning:
238238 $ claim3 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P17 ' ) ) );
239239 $ claims ->addClaim ( $ claim3 , 0 );
240- $ this ->assertEquals ( 0 , $ claims ->indexOf ( $ claim3 ), 'Inserting claim at the beginning failed ' );
241240
242241 // Insert claim at another index:
243242 $ claim4 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P18 ' ) ) );
244243 $ claims ->addClaim ( $ claim4 , 1 );
245- $ this ->assertEquals ( 1 , $ claims ->indexOf ( $ claim4 ), 'Inserting claim at index 1 failed ' );
246244
247245 // Insert claim with an index out of bounds:
248246 $ claim5 = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P19 ' ) ) );
249247 $ claims ->addClaim ( $ claim5 , 99999 );
250- $ this ->assertEquals ( 4 , $ claims ->indexOf ( $ claim5 ), 'Appending claim by specifying an index out of bounds failed ' );
251- }
252-
253- public function testIndexOf () {
254- $ claims = new Claims ();
255- $ claimArray = array (
256- $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P1 ' ) ) ),
257- $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P2 ' ) ) ),
258- $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P3 ' ) ) ),
259- );
260- $ excludedClaim = $ this ->makeClaim ( new PropertyNoValueSnak ( new PropertyId ( 'P99 ' ) ) );
261-
262- foreach ( $ claimArray as $ claim ) {
263- $ claims ->addClaim ( $ claim );
264- }
265-
266- $ this ->assertFalse ( $ claims ->indexOf ( $ excludedClaim ) );
267-
268- $ i = 0 ;
269- foreach ( $ claimArray as $ claim ) {
270- $ this ->assertEquals ( $ i ++, $ claims ->indexOf ( $ claim ) );
271- }
272248 }
273249
274250 public function testAppend () {
0 commit comments