1
0
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:
Jason Varga
2023-08-28 15:41:41 -04:00
parent a93f267c03
commit e52b901415

View File

@@ -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'));
}
}