File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ public function isEmpty() {
230230 */
231231 public function clear () {
232232 $ this ->fingerprint = new Fingerprint ();
233+ $ this ->statements = new StatementList ();
233234 }
234235
235236 /**
Original file line number Diff line number Diff line change @@ -115,14 +115,14 @@ public function testPropertyWithFingerprintIsNotEmpty() {
115115
116116 public function testClearRemovesAllButId () {
117117 $ property = Property::newFromType ( 'string ' );
118-
119118 $ property ->setId ( 42 );
120119 $ property ->getFingerprint ()->setLabel ( 'en ' , 'foo ' );
120+ $ property ->getStatements ()->addNewStatement ( new PropertyNoValueSnak ( 1 ) );
121121
122122 $ property ->clear ();
123123
124124 $ this ->assertEquals ( new PropertyId ( 'P42 ' ), $ property ->getId () );
125- $ this ->assertTrue ( $ property ->getFingerprint ()-> isEmpty () );
125+ $ this ->assertTrue ( $ property ->isEmpty () );
126126 }
127127
128128 public function testGetStatementsReturnsEmptyListForEmptyProperty () {
You can’t perform that action at this time.
0 commit comments