Example #1
0
 /**
  * When no parameters are passed the formatter is a json formatter
  * and no data is added. Also the code is 200 and text is OK
  *
  * @return	null
  */
 public function testDefaultConstructor()
 {
     $compositor = $this->template->getViewCompositor();
     $this->assertInstanceOf('Appfuel\\View\\Compositor\\JsonCompositor', $compositor);
     $this->assertEquals(array(), $this->template->getAll());
     $this->assertEquals(200, $this->template->getStatusCode());
     $this->assertEquals('OK', $this->template->getStatusText());
     $expected = '{"code":200,"message":"OK","data":[]}';
     $this->assertEquals($expected, $this->template->build());
 }