Add Places Tests

This commit is contained in:
Jonny Barnes 2017-02-18 14:31:49 +00:00
parent 29bd596b4a
commit 990c851432
2 changed files with 56 additions and 0 deletions

22
tests/Unit/PlacesTest.php Normal file
View file

@ -0,0 +1,22 @@
<?php
namespace Tests\Unit;
use App\Place;
use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class PlacesTest extends TestCase
{
/**
* Test the near method returns a collection.
*
* @return void
*/
public function test_near_method()
{
$nearby = Place::near(53.5, -2.38, 1000);
$this->assertEquals('the-bridgewater-pub', $nearby[0]->slug);
}
}