Skip to content

Commit 2408c1b

Browse files
committed
Improve test suite
1 parent 0a75cff commit 2408c1b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/PublicSuffixListManagerTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ class PublicSuffixListManagerTest extends TestCase
1616
* @var PublicSuffixListManager List manager
1717
*/
1818
protected $manager;
19-
protected $cache;
20-
protected $root;
21-
protected $cacheDir;
2219
protected $cachePool;
20+
protected $cacheDir;
21+
protected $root;
2322

2423
public function setUp()
2524
{
@@ -50,9 +49,9 @@ public function testGetProvidedListFromDefaultCacheDir()
5049

5150
public function testGetDifferentPublicList()
5251
{
53-
$publicList = $this->manager->getList();
52+
$publicSuffixList = $this->manager->getList();
5453
$invalidList = $this->manager->getList('invalid type');
55-
$this->assertEquals($publicList, $invalidList);
54+
$this->assertEquals($publicSuffixList, $invalidList);
5655
}
5756

5857
public function testRefreshList()

tests/PublicSuffixListTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Pdp\Tests;
1414

1515
use Pdp\Cache\FileCacheAdapter;
16+
use Pdp\Http\CurlHttpAdapter;
1617
use Pdp\MatchedDomain;
1718
use Pdp\NullDomain;
1819
use Pdp\PublicSuffixList;
@@ -29,9 +30,8 @@ class PublicSuffixListTest extends TestCase
2930

3031
public function setUp()
3132
{
32-
$cache = new FileCacheAdapter();
33-
$rules = $cache->get(PublicSuffixListManager::ALL_DOMAINS);
34-
$this->list = new PublicSuffixList($rules);
33+
$manager = new PublicSuffixListManager(new FileCacheAdapter(), new CurlHttpAdapter());
34+
$this->list = $manager->getList();
3535
}
3636

3737
public function testGetRules()

0 commit comments

Comments
 (0)