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
29 lines
865 B
PHP
29 lines
865 B
PHP
<?php
|
|
|
|
use Valet\Drivers\Specific\Magento2ValetDriver;
|
|
|
|
class Magento2ValetDriverTest extends BaseDriverTestCase
|
|
{
|
|
public function test_it_serves_magento2_projects()
|
|
{
|
|
$driver = new Magento2ValetDriver();
|
|
|
|
$this->assertTrue($driver->serves($this->projectDir('magento2'), 'my-site', '/'));
|
|
}
|
|
|
|
public function test_it_doesnt_serve_non_magento2_projects_with_public_directory()
|
|
{
|
|
$driver = new Magento2ValetDriver();
|
|
|
|
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
|
}
|
|
|
|
public function test_it_gets_front_controller()
|
|
{
|
|
$driver = new Magento2ValetDriver();
|
|
|
|
$projectPath = $this->projectDir('magento2');
|
|
$this->assertEquals($projectPath.'/pub/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
|
}
|
|
}
|