Repository navigation
Expand file tree
/
Copy pathNoopTest.php
More file actions
60 lines (48 loc) · 1.4 KB
/
Copy pathNoopTest.php
File metadata and controls
60 lines (48 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/*
* This file is part of the FOSHttpCache package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FOS\HttpCache\Tests\Unit\ProxyClient;
use FOS\HttpCache\ProxyClient\Noop;
use PHPUnit\Framework\TestCase;
class NoopTest extends TestCase
{
private Noop $noop;
protected function setUp(): void
{
$this->noop = new Noop();
}
public function testBan(): void
{
$this->assertSame($this->noop, $this->noop->ban(['header-123']));
}
public function testInvalidateTags(): void
{
$this->assertSame($this->noop, $this->noop->invalidateTags(['tag123']));
}
public function testInvalidatePrefixes(): void
{
$this->assertSame($this->noop, $this->noop->invalidatePrefixes(['example.com/one/']));
}
public function testBanPath(): void
{
$this->assertSame($this->noop, $this->noop->banPath('/123'));
}
public function testFlush(): void
{
$this->assertSame(0, $this->noop->flush());
}
public function testPurge(): void
{
$this->assertSame($this->noop, $this->noop->purge('/123', ['x-123' => 'yes']));
}
public function testRefresh(): void
{
$this->assertSame($this->noop, $this->noop->refresh('/123'));
}
}