public function testClear() { $this->object->put('one', new \stdClass()); $this->object->put('two', new \stdClass()); $this->object->clear(); $this->assertEquals(array(), $this->readAttribute($this->object, 'elements')); }