Ejemplo n.º 1
0
 /**
  * Tests the JApplicationWeb::setBody method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testSetBody()
 {
     $this->class->setBody('foo');
     $this->assertThat(TestReflection::getValue($this->class, 'response')->body, $this->equalTo(array('foo')), 'Checks the body array has been reset.');
     $this->class->setBody(array('goo'));
     $this->assertThat(TestReflection::getValue($this->class, 'response')->body, $this->equalTo(array('Array')), 'Checks reset and that non-strings are converted to strings.');
 }
Ejemplo n.º 2
0
 /**
  * Tests the JApplicationWeb::setBody method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testSetBody()
 {
     $this->class->setBody('foo');
     $this->assertEquals(array('foo'), TestReflection::getValue($this->class, 'response')->body);
     $this->class->setBody(true);
     $this->assertEquals(array('1'), TestReflection::getValue($this->class, 'response')->body);
 }
Ejemplo n.º 3
0
 /**
  * Tests the JApplicationWeb::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.');
 }