33namespace Wikibase \DataModel \Tests \Claim ;
44
55use Exception ;
6- use Wikibase \DataModel \Claim \ ClaimGuid ;
6+ use Wikibase \DataModel \Statement \ StatementGuid ;
77use Wikibase \DataModel \Entity \EntityId ;
88use Wikibase \DataModel \Entity \ItemId ;
99
1010/**
11- * @covers Wikibase\DataModel\Claim\ClaimGuid
11+ * @covers Wikibase\DataModel\Statement\StatementGuid
1212 *
1313 * @group Wikibase
1414 * @group WikibaseDataModel
1717 * @licence GNU GPL v2+
1818 * @author Adam Shorland
1919 */
20- class ClaimGuidTest extends \PHPUnit_Framework_TestCase {
20+ class StatementGuidTest extends \PHPUnit_Framework_TestCase {
2121
2222 /**
2323 * @dataProvider provideConstructionData
@@ -26,10 +26,10 @@ class ClaimGuidTest extends \PHPUnit_Framework_TestCase {
2626 * @param string $expected
2727 */
2828 public function testConstructor ( EntityId $ entityId , $ guid , $ expected ) {
29- $ claimGuid = new ClaimGuid ( $ entityId , $ guid );
29+ $ statementGuid = new StatementGuid ( $ entityId , $ guid );
3030
31- $ this ->assertEquals ( $ expected , $ claimGuid ->getSerialization () );
32- $ this ->assertEquals ( $ entityId , $ claimGuid ->getEntityId ());
31+ $ this ->assertEquals ( $ expected , $ statementGuid ->getSerialization () );
32+ $ this ->assertEquals ( $ entityId , $ statementGuid ->getEntityId ());
3333 }
3434
3535 public function provideConstructionData () {
@@ -59,7 +59,7 @@ public function provideConstructionData() {
5959 */
6060 public function testBadConstruction ( $ entityId , $ guid ) {
6161 $ this ->setExpectedException ( 'InvalidArgumentException ' );
62- new ClaimGuid ( $ entityId , $ guid );
62+ new StatementGuid ( $ entityId , $ guid );
6363 }
6464
6565 public function provideBadConstruction () {
@@ -74,35 +74,37 @@ public function provideBadConstruction() {
7474 return $ argLists ;
7575 }
7676
77- public function provideClaimGuids () {
77+ public function provideStatementGuids () {
7878 $ constructionDatas = $ this ->provideConstructionData ();
7979 $ argLists = array ();
8080
8181 foreach ( $ constructionDatas as $ constructionData ){
82- $ argLists [] = array ( new ClaimGuid ( $ constructionData [0 ], $ constructionData [1 ] ) );
82+ $ argLists [] = array ( new StatementGuid ( $ constructionData [0 ], $ constructionData [1 ] ) );
8383 }
8484
8585 return $ argLists ;
8686 }
8787
8888 /**
89- * @dataProvider provideClaimGuids
90- * @param ClaimGuid $claimGuid
89+ * @dataProvider provideStatementGuids
90+ *
91+ * @param StatementGuid $statementGuid
9192 */
92- public function testEquals ( ClaimGuid $ claimGuid ) {
93- $ claimGuidCopy = clone $ claimGuid ;
94- $ this ->assertTrue ( $ claimGuid ->equals ( $ claimGuidCopy ) );
95- $ this ->assertTrue ( $ claimGuidCopy ->equals ( $ claimGuid ) );
93+ public function testEquals ( StatementGuid $ statementGuid ) {
94+ $ statementGuidCopy = clone $ statementGuid ;
95+ $ this ->assertTrue ( $ statementGuid ->equals ( $ statementGuidCopy ) );
96+ $ this ->assertTrue ( $ statementGuidCopy ->equals ( $ statementGuid ) );
9697 }
9798
9899 /**
99- * @dataProvider provideClaimGuids
100- * @param ClaimGuid $claimGuid
100+ * @dataProvider provideStatementGuids
101+ *
102+ * @param StatementGuid $statementGuid
101103 */
102- public function testNotEquals ( ClaimGuid $ claimGuid ) {
103- $ notEqualClaimGuid = new ClaimGuid ( new ItemId ( 'q9999 ' ), 'someguid ' );
104- $ this ->assertFalse ( $ claimGuid ->equals ( $ notEqualClaimGuid ) );
105- $ this ->assertFalse ( $ notEqualClaimGuid ->equals ( $ claimGuid ) );
104+ public function testNotEquals ( StatementGuid $ statementGuid ) {
105+ $ notEqualStatementGuid = new StatementGuid ( new ItemId ( 'q9999 ' ), 'someguid ' );
106+ $ this ->assertFalse ( $ statementGuid ->equals ( $ notEqualStatementGuid ) );
107+ $ this ->assertFalse ( $ notEqualStatementGuid ->equals ( $ statementGuid ) );
106108 }
107109
108110}
0 commit comments