@@ -621,54 +621,6 @@ public function testGetByRanks( Claims $input, $ranks, $expected ) {
621621 $ this ->assertEquals ( $ input ->getByRanks ( $ ranks ), $ expected );
622622 }
623623
624- public function testGetBestClaimsEmpty () {
625- $ claims = new Claims ();
626- $ this ->assertEquals ( $ claims ->getBestClaims (), new Claims () );
627- }
628-
629- public function testGetBestClaimsOnlyOne () {
630- $ statement = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P1 ' ) ) );
631- $ statement ->setRank ( Statement::RANK_NORMAL );
632-
633- $ claims = new Claims ( array ( $ statement ) );
634- $ this ->assertEquals ( $ claims ->getBestClaims (), $ claims );
635- }
636-
637- public function testGetBestClaimsNoDeprecated () {
638- $ statement = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P1 ' ) ) );
639- $ statement ->setRank ( Statement::RANK_DEPRECATED );
640-
641- $ claims = new Claims ( array ( $ statement ) );
642- $ this ->assertEquals ( $ claims ->getBestClaims (), new Claims () );
643- }
644-
645- public function testGetBestClaimsReturnOne () {
646- $ s1 = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P1 ' ) ) );
647- $ s1 ->setRank ( Statement::RANK_DEPRECATED );
648-
649- $ s2 = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P2 ' ) ) );
650- $ s2 ->setRank ( Statement::RANK_NORMAL );
651-
652- $ claims = new Claims ( array ( $ s1 , $ s2 ) );
653- $ expected = new Claims ( array ( $ s2 ) );
654- $ this ->assertEquals ( $ claims ->getBestClaims (), $ expected );
655- }
656-
657- public function testGetBestClaimsReturnTwo () {
658- $ s1 = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P1 ' ) ) );
659- $ s1 ->setRank ( Statement::RANK_NORMAL );
660-
661- $ s2 = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P2 ' ) ) );
662- $ s2 ->setRank ( Statement::RANK_PREFERRED );
663-
664- $ s3 = $ this ->makeStatement ( new PropertyNoValueSnak ( new PropertyId ( 'P3 ' ) ) );
665- $ s3 ->setRank ( Statement::RANK_PREFERRED );
666-
667- $ claims = new Claims ( array ( $ s3 , $ s1 , $ s2 ) );
668- $ expected = new Claims ( array ( $ s2 , $ s3 ) );
669- $ this ->assertEquals ( $ claims ->getBestClaims (), $ expected );
670- }
671-
672624 public function testEmptyListEqualsEmptyList () {
673625 $ list = new Claims ( array () );
674626 $ this ->assertTrue ( $ list ->equals ( clone $ list ) );
0 commit comments