public function indexAction() { $request = $this->getRequest(); if ($request->isPost()) { $scraping = new Scraping(); $cnpj = $request->getPost()->num_cnpj; $render = $scraping->spider($cnpj); return array("flash" => $render); } return new ViewModel(); }
public function testSpiderKeyExistsError() { $scraping = new Scraping(); $arr_final = $scraping->spider(); $this->assertEquals($arr_final['error'], true); }