1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00
Files
laravel-valet/tests/Drivers/ValetDriverTest.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

24 lines
702 B
PHP

<?php
use Valet\Drivers\Specific\BedrockValetDriver;
use Valet\Drivers\ValetDriver;
class ValetDriverTest extends BaseDriverTestCase
{
public function test_it_gets_drivers_in_given_path()
{
$output = ValetDriver::driversIn(__DIR__.'/../files/Drivers');
$this->assertEquals(2, count($output));
$this->assertContains('Test1ValetDriver', $output);
$this->assertContains('Test2ValetDriver', $output);
}
public function test_it_assigns_drivers_to_given_project()
{
$assignedDriver = ValetDriver::assign($this->projectDir('bedrock'), 'my-site', '/');
$this->assertEquals(BedrockValetDriver::class, get_class($assignedDriver));
}
}