Initial commit to new repo
This commit is contained in:
parent
a267f9bfcc
commit
a5173c981b
292 changed files with 17472 additions and 0 deletions
52
tests/PlacesTest.php
Normal file
52
tests/PlacesTest.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Tests;
|
||||
|
||||
use TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class PlacesTest extends TestCase
|
||||
{
|
||||
protected $appurl;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->appurl = config('app.url');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the `/places` page for OK response.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testPlacesPage()
|
||||
{
|
||||
$this->visit($this->appurl . '/places')
|
||||
->assertResponseOK();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a specific place.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSinglePlace()
|
||||
{
|
||||
$this->visit($this->appurl . '/places/the-bridgewater-pub')
|
||||
->see('The Bridgewater Pub');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the nearby method returns a collection.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testNearbyMethod()
|
||||
{
|
||||
$nearby = \App\Place::near(53.5, -2.38, 1000);
|
||||
$this->assertEquals('the-bridgewater-pub', $nearby[0]->slug);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue