File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ public function isEmpty() {
237237 */
238238 public function clear () {
239239 $ this ->fingerprint = new Fingerprint ();
240+ $ this ->statements = new StatementList ();
240241 }
241242
242243 /**
Original file line number Diff line number Diff line change @@ -118,14 +118,14 @@ public function testPropertyWithFingerprintIsNotEmpty() {
118118
119119 public function testClearRemovesAllButId () {
120120 $ property = Property::newFromType ( 'string ' );
121-
122121 $ property ->setId ( 42 );
123122 $ property ->getFingerprint ()->setLabel ( 'en ' , 'foo ' );
123+ $ property ->getStatements ()->addNewStatement ( new PropertyNoValueSnak ( 1 ) );
124124
125125 $ property ->clear ();
126126
127127 $ this ->assertEquals ( new PropertyId ( 'P42 ' ), $ property ->getId () );
128- $ this ->assertTrue ( $ property ->getFingerprint ()-> isEmpty () );
128+ $ this ->assertTrue ( $ property ->isEmpty () );
129129 }
130130
131131 public function testGetStatementsReturnsEmptyListForEmptyProperty () {
You can’t perform that action at this time.
0 commit comments