1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00
Files
laravel-valet/tests/Drivers/KirbyValetDriverTest.php
2022-12-03 02:15:35 +00:00

31 lines
907 B
PHP

<?php
use Valet\Drivers\KirbyValetDriver;
class KirbyValetDriverTest extends BaseDriverTestCase
{
public function test_it_serves_kirby_projects()
{
$driver = new KirbyValetDriver();
$this->assertTrue($driver->serves($this->projectDir('kirby'), 'my-site', '/'));
}
public function test_it_doesnt_serve_non_kirby_projects_with_public_directory()
{
$driver = new KirbyValetDriver();
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
}
public function test_it_gets_front_controller()
{
$driver = new KirbyValetDriver();
$_SERVER['HTTP_HOST'] = 'this is set in Valet requests but not phpunit';
$projectPath = $this->projectDir('kirby');
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
}
}