public function testSet() { $response = new Simples_Response(array()); $response->set('field', 'value'); $this->assertEquals('value', $response->field); $response->set(array('field' => 'value2')); $this->assertEquals('value2', $response->field); }
/** * Constructor overriden : do highlight work. * * @param array $data Response data. * @param array $config Response options. */ public function __construct(array $data, array $config = null) { parent::__construct($data, $config); if ($this->config('highlight') === Simples_Request_Search::HIGHLIGHT_REPLACE) { $this->set($this->_replaceHighlights($data)); } }