コード例 #1
0
 public function testUpdateTicketClusters()
 {
     $ticket = new Ticket($this->testTicketId);
     GeoCluster::updateTicketClusters($ticket);
     $zend_db = Database::getConnection();
     $result = $zend_db->query('select * from ticket_geodata where ticket_id=?')->execute([$this->testTicketId]);
     $row = $result->current();
     for ($i = 0; $i <= 6; $i++) {
         $this->assertGreaterThan(0, $row["cluster_id_{$i}"]);
     }
 }
コード例 #2
0
ファイル: Ticket.php プロジェクト: CodeForEindhoven/uReport
 public function save()
 {
     $this->setLastModified(date(DATE_FORMAT));
     parent::save();
     if ($this->needToUpdateClusters) {
         GeoCluster::updateTicketClusters($this);
     }
     $this->updateSearchIndex();
 }