11<?php
2+
23namespace Barberry ;
34
4- use Barberry \nonlinear ;
55use Barberry \Test ;
6+ use PHPUnit \Framework \TestCase ;
67
7- class CacheIntegrationTest extends \PHPUnit_Framework_TestCase {
8+ class CacheIntegrationTest extends TestCase
9+ {
810
911 private $ cache_path ;
1012
11- protected function setUp () {
13+ protected function setUp (): void
14+ {
1215 $ this ->cache_path = '/tmp/testCache/ ' ;
1316 @mkdir ($ this ->cache_path );
1417 }
1518
16- protected function tearDown () {
19+ protected function tearDown (): void
20+ {
1721 exec ('rm -rf ' . $ this ->cache_path );
1822 }
1923
20- public function testIsContentSavedInFileSystem () {
24+ public function testIsContentSavedInFileSystem ()
25+ {
2126 $ this ->cache ()->save (
2227 Test \Data::gif1x1 (),
2328 new Request ('/7yU98sd_1x1.gif ' )
@@ -28,7 +33,8 @@ public function testIsContentSavedInFileSystem() {
2833 $ this ->assertEquals (file_get_contents ($ expectedPath ), Test \Data::gif1x1 ());
2934 }
3035
31- public function testIsContentSavedInFileSystemInGroupDirectory () {
36+ public function testIsContentSavedInFileSystemInGroupDirectory ()
37+ {
3238 $ this ->cache ()->save (
3339 Test \Data::gif1x1 (),
3440 new Request ('/adm/7yU98sd_1x1.gif ' )
@@ -51,7 +57,8 @@ public function testInvalidateRemovesCachedContent()
5157 $ this ->assertFalse (is_dir ($ this ->cache_path . '/7y/U9/8s/7yU98sd ' ));
5258 }
5359
54- private function cache () {
60+ private function cache ()
61+ {
5562 return new Cache ($ this ->cache_path );
5663 }
5764}
0 commit comments