public function __construct(Cidade $cidade, ClimaTempo $ct)
 {
     $this->ct = $ct;
     $cidade_nome = $this->ct['stringHelper']->clean($cidade->getNome());
     $cidade_uf = strtolower($cidade->getUf());
     $this->url .= "{$cidade->getId()}/{$cidade_nome}-{$cidade_uf}";
     $html = $this->ct['htmlHelper']->google_curl($this->url);
     // TODO: Tratar os erros html que retornam na função abaixo
     @$this->ct['htmlHelper']->getDom()->loadHTML($html);
     $wrapperDivs = $this->ct['htmlHelper']->get_all_by_class($this->ct['htmlHelper']->getDom(), "box-prev-completa");
     foreach ($wrapperDivs as $node) {
         $this->results[] = ["dia" => trim($this->ct['htmlHelper']->get_one_by_class($node, "data-prev")->nodeValue), "tempo" => $this->get_previsao_horarios($node), "tempMax" => trim($this->ct['htmlHelper']->get_one_by_class($node, "max")->nodeValue), "tempMin" => trim($this->ct['htmlHelper']->get_one_by_class($node, "min")->nodeValue), "resumo" => trim($this->ct['htmlHelper']->get_one_by_class($node, "fraseologia-prev")->nodeValue)];
     }
 }
 public function testSettersAndGetters()
 {
     $this->assertInstanceOf('ClimaTempo\\Cidades\\Cidade', $this->cidade->setId(123));
     $this->assertEquals(123, $this->cidade->getId());
     $this->assertInstanceOf('ClimaTempo\\Cidades\\Cidade', $this->cidade->setNome("Nome da Cidade"));
     $this->assertEquals("Nome da Cidade", $this->cidade->getNome());
     $this->assertInstanceOf('ClimaTempo\\Cidades\\Cidade', $this->cidade->setUf("UF"));
     $this->assertEquals("UF", $this->cidade->getUf());
 }
 public function create($id = null, $nome = null, $uf = null)
 {
     $cidade = new Cidade($this->ct);
     $cidade->setId($id)->setNome($nome)->setUf($uf);
     return $cidade;
 }