/** @test */ public function it_should_parse_english_jibun_address_keyword() { $keywords = '123-45, Samsung-dong'; $query = Query::parseKeyword($keywords); $this->assertSame('samsungdong', $query->dongri); $this->assertSame('123', $query->numbers[0]); $this->assertSame('45', $query->numbers[1]); $this->assertSame('JIBEON', $query->sort); $this->assertSame('EN', $query->lang); }
/** @test */ public function it_should_find_jibeon_addresses() { $query = Query::parseKeyword('삼성동 123-4'); $result = $this->database->search($query); $this->assertNotEmpty($result->results); }
/** * @param Query $query * @param Result $result */ private function put($query, $result) { if ($this->cache) { $this->cache->put($query->getHashKey(), serialize($result), $this->lifetime); } }