class GeoHashTest in geoPHP 7
Hierarchy
- class \GeoHashTest extends \PHPUnit_Framework_TestCase
Expanded class hierarchy of GeoHashTest
File
- geoPHP/tests/ tests/ geohashTest.php, line 4 
View source
class GeoHashTest extends PHPUnit_Framework_TestCase {
  function setUp() {
  }
  /**
   * test cases for adjacent geohashes.
   */
  function testAdjacent() {
    $geohash = new Geohash();
    $this
      ->assertEquals('xne', $geohash
      ->adjacent('xn7', 'top'), 'Did not find correct top adjacent geohash for xn7');
    $this
      ->assertEquals('xnk', $geohash
      ->adjacent('xn7', 'right'), 'Did not find correct right adjacent geohash for xn7');
    $this
      ->assertEquals('xn5', $geohash
      ->adjacent('xn7', 'bottom'), 'Did not find correct bottom adjacent geohash for xn7');
    $this
      ->assertEquals('xn6', $geohash
      ->adjacent('xn7', 'left'), 'Did not find correct left adjacent geohash for xn7');
    $this
      ->assertEquals('xnd', $geohash
      ->adjacent($geohash
      ->adjacent('xn7', 'left'), 'top'), 'Did not find correct top-left adjacent geohash for xn7');
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| GeoHashTest:: | function | |||
| GeoHashTest:: | function | test cases for adjacent geohashes. | 
