Ejemplo n.º 1
0
 public function testOnFactoryResponseTypes()
 {
     $htmlInstace = Factory::response(ResponseType::HTML);
     $this->assertInstanceOf("MyFrameWork\\Response\\HtmlResponse", $htmlInstace);
     $emtyInstace = Factory::response(ResponseType::EMPT);
     $this->assertInstanceOf("MyFrameWork\\Response\\EmptyResponse", $emtyInstace);
 }
Ejemplo n.º 2
0
 public function testResponse()
 {
     $this->assertNotNull(Factory::response('Html'));
     $this->assertEquals(Factory::response('Html'), Factory::response('html'));
     $this->assertNotEquals(Factory::response('Empty'), Factory::response('html'));
     $this->assertNotNull(Factory::response('json'));
     $this->assertNotEquals(Factory::response('Empty'), Factory::response('Json'));
     $this->assertNotNull(Factory::response('auxua'));
     $this->assertEquals(Factory::response('Empty'), Factory::response('auxua'));
 }
Ejemplo n.º 3
0
 /**
  * Renderiza a página exibindo o seu resultado no navegador
  */
 protected function render()
 {
     $response = Factory::response($this->responseType);
     $response->setHeader();
     $response->renderContent($this->getPagedata(), $this->getFilename());
 }