diff --git a/tests/Drivers/StatamicValetDriverTest.php b/tests/Drivers/StatamicValetDriverTest.php index 5b41238..5d2f0ee 100644 --- a/tests/Drivers/StatamicValetDriverTest.php +++ b/tests/Drivers/StatamicValetDriverTest.php @@ -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')); + } }