/** * Tests the JApplicationWeb::clearHeaders method. * * @return void * * @since 11.3 */ public function testClearHeaders() { // Fill the header array with an arbitrary value. TestReflection::setValue($this->class, 'response', (object) array('cachable' => null, 'headers' => array('foo'), 'body' => array())); $this->class->clearHeaders(); $this->assertEquals(array(), TestReflection::getValue($this->class, 'response')->headers); }
/** * Tests the JApplicationWeb::clearHeaders method. * * @return void * * @since 11.3 */ public function testClearHeaders() { // Fill the header array with an arbitrary value. $this->inspector->setClassProperty('response', (object) array('cachable' => null, 'headers' => array('foo'), 'body' => array())); $this->inspector->clearHeaders(); $this->assertThat($this->inspector->getClassProperty('response')->headers, $this->equalTo(array()), 'Checks the headers were cleared.'); }