File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace Wikibase \DataModel \Tests ;
44
5+ use ArrayObject ;
56use DataValues \StringValue ;
67use ReflectionClass ;
78use ReflectionMethod ;
89use Wikibase \DataModel \ByPropertyIdArray ;
9- use Wikibase \DataModel \Claim \Claims ;
1010use Wikibase \DataModel \Entity \PropertyId ;
1111use Wikibase \DataModel \Snak \PropertyNoValueSnak ;
1212use Wikibase \DataModel \Snak \PropertySomeValueSnak ;
@@ -33,10 +33,10 @@ public function testArrayObjectNotConstructedFromObject() {
3333 $ statement2 = new Statement ( new PropertyNoValueSnak ( 2 ) );
3434 $ statement2 ->setGuid ( '2 ' );
3535
36- $ claims = new Claims ();
37- $ claims ->append ( $ statement1 );
36+ $ object = new ArrayObject ();
37+ $ object ->append ( $ statement1 );
3838
39- $ byPropertyIdArray = new ByPropertyIdArray ( $ claims );
39+ $ byPropertyIdArray = new ByPropertyIdArray ( $ object );
4040 // According to the documentation append() "cannot be called when the ArrayObject was
4141 // constructed from an object." This test makes sure it was not constructed from an object.
4242 $ byPropertyIdArray ->append ( $ statement2 );
Original file line number Diff line number Diff line change 22
33namespace Wikibase \DataModel \Tests \Statement ;
44
5+ use ArrayObject ;
56use DataValues \StringValue ;
6- use Wikibase \DataModel \Claim \Claims ;
77use Wikibase \DataModel \Entity \PropertyId ;
88use Wikibase \DataModel \Reference ;
99use Wikibase \DataModel \ReferenceList ;
@@ -280,15 +280,14 @@ public function testGivenNullGuid_allStatementsWithNoGuidAreRemoved() {
280280 $ this ->assertEquals ( new StatementList ( $ statement1 ), $ list );
281281 }
282282
283- public function testCanConstructWithClaimsObjectContainingOnlyStatements () {
283+ public function testCanConstructWithTraversableContainingOnlyStatements () {
284284 $ statementArray = array (
285285 $ this ->getStatementWithSnak ( 1 , 'foo ' ),
286286 $ this ->getStatementWithSnak ( 2 , 'bar ' ),
287287 );
288288
289- $ claimsObject = new Claims ( $ statementArray );
290-
291- $ list = new StatementList ( $ claimsObject );
289+ $ object = new ArrayObject ( $ statementArray );
290+ $ list = new StatementList ( $ object );
292291
293292 $ this ->assertEquals (
294293 $ statementArray ,
You can’t perform that action at this time.
0 commit comments