/** * Tests the JWeb::setBody method. * * @return void * * @since 11.3 */ public function testSetBody() { $this->inspector->setBody('foo'); $this->assertThat($this->inspector->getClassProperty('response')->body, $this->equalTo(array('foo')), 'Checks the body array has been reset.'); $this->inspector->setBody(array('goo')); $this->assertThat($this->inspector->getClassProperty('response')->body, $this->equalTo(array('Array')), 'Checks reset and that non-strings are converted to strings.'); }