mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
adjust tests
This commit is contained in:
@@ -11,21 +11,25 @@ public function test_it_serves_statamic_projects()
|
||||
$this->assertTrue($driver->serves($this->projectDir('statamic'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_statamic_projects()
|
||||
public function test_it_doesnt_serve_non_statamic_projects_with_public_directory()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_laravel_projects()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_SERVER['REQUEST_URI'] = '/about/';
|
||||
|
||||
$projectPath = $this->projectDir('statamicv1');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
$projectPath = $this->projectDir('statamic');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user