Passed
Pull Request — master (#139)
by Chris
02:31
created

CookieJarMock::forceExpiry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 5
dl 0
loc 2
rs 10
1
<?php
2
3
namespace SilverStripe\StaticPublishQueue\Dev;
4
5
use SilverStripe\Control\CookieJar;
6
use SilverStripe\Dev\TestOnly;
7
8
/**
9
 * Test only version of @see CookieJar to provide ability to skip cookies output as it may cause unit test failures
10
 * for tests which execute output rendering such as static cache jobs
11
 */
12
class CookieJarMock extends CookieJar implements TestOnly
13
{
14
    public function set($name, $value, $expiry = 90, $path = null, $domain = null, $secure = false, $httpOnly = true)
15
    {
16
        // No op
17
    }
18
19
    public function forceExpiry($name, $path = null, $domain = null, $secure = false, $httpOnly = true)
20
    {
21
        // No op
22
    }
23
}
24