public function testCleanHouses() { RawDataHelper::cleanHouses($this->db, $this->housesTable); $this->assertEquals(1, $this->db->execute('SELECT COUNT(*) FROM ?f WHERE building IS NULL AND id = ?q', [$this->housesTable, 'a64330e3-7a41-41ee-a8a2-41db8693c584'])->fetchResult()); $this->assertEquals(1, $this->db->execute('SELECT COUNT(*) FROM ?f WHERE building IS NULL AND structure IS NULL AND id = ?q', [$this->housesTable, 'b3ace9e8-dead-4e2c-9c56-e524aef28082'])->fetchResult()); $this->assertEquals(1, $this->db->execute('SELECT COUNT(*) FROM ?f WHERE full_number = ?q AND id = ?q', [$this->housesTable, '02с1', 'a64330e3-7a41-41ee-a8a2-41db8693c584'])->fetchResult()); }
public function modifyDataAfterImport() { $this->createTemporaryIndexes(); RawDataHelper::cleanHouses($this->db, $this->table); $this->removeOldRecords(); $this->addNewRecords(); RawDataHelper::updateHousesCount($this->db); RawDataHelper::updateNextAddressLevelFlag($this->db); }
public function modifyDataAfterImport() { RawDataHelper::cleanHouses($this->db, $this->table); RawDataHelper::updateHousesCount($this->db); RawDataHelper::updateNextAddressLevelFlag($this->db); }