public function setData($key, $value = null) { if (is_array($key)) { $this->data = $key; } else { $this->data[$key] = $value; } return $this; }
/** * Test * * @return void */ public function testOffsetGet() { $this->object->setData('k', 'v'); $this->assertEquals('v', $this->object->offsetGet('k')); }