Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ServiceTest extends WebTestCase |
||
11 | { |
||
12 | protected $translator; |
||
13 | |||
14 | public function test_get_response_with_accepted_cookie_should_return_response_with_cookie() |
||
15 | { |
||
16 | $service = new Service('12 days'); |
||
17 | |||
18 | $cookie = Cookie::create('msalsas-gdpr-consent-banner', 'accepted', strtotime('now + 12 days')); |
||
19 | $expectedResponse = new Response("accepted"); |
||
20 | $expectedResponse->headers->setCookie($cookie); |
||
21 | |||
22 | $response = $service->getResponseWithAcceptedCookie(); |
||
23 | |||
24 | $this->assertEquals($expectedResponse , $response); |
||
25 | } |
||
26 | } |