public function testClear() { $this->object->add(new \stdClass()); $this->object->clear(); $this->assertEmpty($this->readAttribute($this->object, 'elements')); }