1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 16:40:05 +01:00
Files
laravel-valet/tests/Drivers/StatamicValetDriverTest.php
Matt Stauffer efa7937038 Update drivers location and loading
- Extract much of server.php into a `Server` class
- Move all but the Laravel and Basic drivers into a subfolder
- Load all but the Laravel and Basic drivers via glob
- Add `beforeLoading` hook to simplify the `frontControllerPath` method for some drivers
2022-12-18 15:08:17 -06:00

32 lines
931 B
PHP

<?php
use Valet\Drivers\Specific\StatamicValetDriver;
class StatamicValetDriverTest extends BaseDriverTestCase
{
public function test_it_serves_statamic_projects()
{
$driver = new StatamicValetDriver();
$this->assertTrue($driver->serves($this->projectDir('statamic'), 'my-site', '/'));
}
public function test_it_doesnt_serve_non_statamic_projects()
{
$driver = new StatamicValetDriver();
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-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', '/'));
}
}