mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
add test for static caching
This commit is contained in:
@@ -32,4 +32,17 @@ public function test_it_gets_front_controller()
|
||||
$projectPath = $this->projectDir('statamic');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_serves_statically_cached_pages()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
|
||||
$projectPath = $this->projectDir('statamic');
|
||||
|
||||
$_SERVER['REQUEST_URI'] = '/test';
|
||||
$this->assertEquals($projectPath.'/public/static/test_.html', $driver->frontControllerPath($projectPath, 'my-site', '/test'));
|
||||
|
||||
$_SERVER['REQUEST_URI'] = '/test?foo=bar&baz=qux';
|
||||
$this->assertEquals($projectPath.'/public/static/test_foo=bar&baz=qux.html', $driver->frontControllerPath($projectPath, 'my-site', '/test'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user