mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
- 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
31 lines
916 B
PHP
31 lines
916 B
PHP
<?php
|
|
|
|
use Valet\Drivers\Specific\BedrockValetDriver;
|
|
|
|
class BedrockValetDriverTest extends BaseDriverTestCase
|
|
{
|
|
public function test_it_serves_bedrock_projects()
|
|
{
|
|
$driver = new BedrockValetDriver();
|
|
|
|
$this->assertTrue($driver->serves($this->projectDir('bedrock'), 'my-site', '/'));
|
|
}
|
|
|
|
public function test_it_doesnt_serve_non_bedrock_projects()
|
|
{
|
|
$driver = new BedrockValetDriver();
|
|
|
|
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
|
}
|
|
|
|
public function test_it_gets_front_controller()
|
|
{
|
|
$driver = new BedrockValetDriver();
|
|
|
|
$_SERVER['HTTP_HOST'] = 'this is set in Valet requests but not phpunit';
|
|
|
|
$projectPath = $this->projectDir('bedrock');
|
|
$this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
|
}
|
|
}
|