diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:05:08 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:05:08 +0200 |
commit | b6f678a5a1d15acf284ebcec16c905e976671ce1 (patch) | |
tree | 33c7da831482ed79c44896ef19c73c72ada84f2e /tests/feed/CachedPageTest.php | |
parent | b14687036b9b800681197f51fdc47e62f0c88e2e (diff) | |
parent | 1c1520b6b98ab20201bfe15577782a52320339df (diff) | |
download | Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.tar.gz Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.tar.zst Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.zip |
Merge branch 'v0.12' into latest
Diffstat (limited to 'tests/feed/CachedPageTest.php')
-rw-r--r-- | tests/feed/CachedPageTest.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/feed/CachedPageTest.php b/tests/feed/CachedPageTest.php index 0bcc1442..904db9dc 100644 --- a/tests/feed/CachedPageTest.php +++ b/tests/feed/CachedPageTest.php | |||
@@ -7,17 +7,17 @@ namespace Shaarli\Feed; | |||
7 | /** | 7 | /** |
8 | * Unitary tests for cached pages | 8 | * Unitary tests for cached pages |
9 | */ | 9 | */ |
10 | class CachedPageTest extends \PHPUnit\Framework\TestCase | 10 | class CachedPageTest extends \Shaarli\TestCase |
11 | { | 11 | { |
12 | // test cache directory | 12 | // test cache directory |
13 | protected static $testCacheDir = 'sandbox/pagecache'; | 13 | protected static $testCacheDir = 'sandbox/pagecache'; |
14 | protected static $url = 'http://shaar.li/?do=atom'; | 14 | protected static $url = 'http://shaar.li/feed/atom'; |
15 | protected static $filename; | 15 | protected static $filename; |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * Create the cache directory if needed | 18 | * Create the cache directory if needed |
19 | */ | 19 | */ |
20 | public static function setUpBeforeClass() | 20 | public static function setUpBeforeClass(): void |
21 | { | 21 | { |
22 | if (!is_dir(self::$testCacheDir)) { | 22 | if (!is_dir(self::$testCacheDir)) { |
23 | mkdir(self::$testCacheDir); | 23 | mkdir(self::$testCacheDir); |
@@ -28,7 +28,7 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase | |||
28 | /** | 28 | /** |
29 | * Reset the page cache | 29 | * Reset the page cache |
30 | */ | 30 | */ |
31 | public function setUp() | 31 | protected function setUp(): void |
32 | { | 32 | { |
33 | if (file_exists(self::$filename)) { | 33 | if (file_exists(self::$filename)) { |
34 | unlink(self::$filename); | 34 | unlink(self::$filename); |
@@ -42,8 +42,9 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase | |||
42 | { | 42 | { |
43 | new CachedPage(self::$testCacheDir, '', true); | 43 | new CachedPage(self::$testCacheDir, '', true); |
44 | new CachedPage(self::$testCacheDir, '', false); | 44 | new CachedPage(self::$testCacheDir, '', false); |
45 | new CachedPage(self::$testCacheDir, 'http://shaar.li/?do=rss', true); | 45 | new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/rss', true); |
46 | new CachedPage(self::$testCacheDir, 'http://shaar.li/?do=atom', false); | 46 | new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/atom', false); |
47 | $this->addToAssertionCount(1); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | /** | 50 | /** |