function test_new_host_new_day()
 {
     $this->test_new_host();
     $date = new date();
     $date->set_by_days($date->date_to_days() + 1);
     $this->stats_counter->set_new_host();
     $this->stats_counter->update($date);
     $this->_check_stats_counter_record($hits_all = 2, $hits_today = 1, $hosts_all = 2, $hosts_today = 1, $date);
     $this->_check_stats_day_counters_record($hits_today, $hosts_today, $home_hits = 0, $audience_host = 0, $date);
     $this->_check_counters_consistency($date);
 }
 function test_same_host_wrong_day()
 {
     $date1 = new date();
     $ip = ip::encode_ip('192.168.0.5');
     $this->stats_ip->setReturnValue('get_client_ip', $ip);
     $this->stats_ip->is_new_host($date1);
     $date2 = new date();
     $date2->set_by_days($date1->date_to_days() - 2);
     $this->stats_ip->setReturnValueAt(1, 'get_client_ip', $ip);
     $this->assertFalse($this->stats_ip->is_new_host($date2));
     $this->_check_stats_ip_record($total_records = 1, $ip, $date1);
 }