Skip to content

Commit e727484

Browse files
committed
change default for varnish configuration to 4
1 parent 6b42512 commit e727484

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/Test/VarnishTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ protected function getCacheDir()
118118
*/
119119
protected function getVarnishVersion()
120120
{
121-
return getenv('VARNISH_VERSION') ?: 4;
121+
return getenv('VARNISH_VERSION') ?: '4.0';
122122
}
123123

124124
/**

tests/Functional/Varnish/UserContextCacheTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class UserContextCacheTest extends UserContextTestCase
1919
{
2020
protected function getConfigFile()
2121
{
22-
switch ($this->getVarnishVersion()) {
23-
case '4.0':
24-
return './tests/Functional/Fixtures/varnish-4/user_context_cache.vcl';
25-
default:
22+
switch ((int)$this->getVarnishVersion()) {
23+
case 3:
2624
return './tests/Functional/Fixtures/varnish-3/user_context_cache.vcl';
25+
default:
26+
return './tests/Functional/Fixtures/varnish-4/user_context_cache.vcl';
2727
}
2828
}
2929

tests/Functional/Varnish/UserContextFailureTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testHashRequestFailure()
8989

9090
protected function getConfigFile()
9191
{
92-
switch ($this->getVarnishVersion()) {
92+
switch ((int)$this->getVarnishVersion()) {
9393
case 3:
9494
return sprintf('./tests/Functional/Fixtures/varnish-3/user_context_%s.vcl', $this->mode);
9595
default:

tests/Functional/Varnish/UserContextNocacheTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class UserContextNocacheTest extends UserContextTestCase
1919
{
2020
protected function getConfigFile()
2121
{
22-
switch ($this->getVarnishVersion()) {
23-
case '4.0':
24-
return './tests/Functional/Fixtures/varnish-4/user_context_nocache.vcl';
25-
default:
22+
switch ((int)$this->getVarnishVersion()) {
23+
case 3:
2624
return './tests/Functional/Fixtures/varnish-3/user_context_nocache.vcl';
25+
default:
26+
return './tests/Functional/Fixtures/varnish-4/user_context_nocache.vcl';
2727
}
2828
}
2929

0 commit comments

Comments
 (0)