Skip to content

Commit 7797ce2

Browse files
lucasMesquitaBorgesJoão Roberto
authored andcommitted
Add test to ensure won't read enable config more than once
1 parent 8c55609 commit 7797ce2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Config/ConfigTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ public function testNotSkipRouteWithFileExtension()
9090
$this->assertNotEquals($this->html, $response->getContent());
9191
}
9292

93+
public function testWontReadEnableConfigMoreThanOnce()
94+
{
95+
$pageSpeed = m::mock(TrimUrls::class)
96+
->shouldAllowMockingProtectedMethods()
97+
->makePartial();
98+
99+
config(['laravel-page-speed.enable' => false]);
100+
101+
$this->assertTrue($pageSpeed->isEnable());
102+
}
103+
93104
protected function mockMiddlewareWithEnableNull()
94105
{
95106
$mock = m::mock(TrimUrls::class)

0 commit comments

Comments
 (0)