| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | public function testGetClientId() |
||
| 16 | { |
||
| 17 | $provider = $this->getMockBuilder('Happyr\GoogleAnalyticsBundle\Service\ClientIdProvider') |
||
| 18 | ->setMethods(['getClientIdFormCookie']) |
||
| 19 | ->disableOriginalConstructor() |
||
| 20 | ->getMock(); |
||
| 21 | $provider->expects($this->once()) |
||
| 22 | ->method('getClientIdFormCookie') |
||
| 23 | ->willReturn(false); |
||
| 24 | |||
| 25 | $result = $provider->getClientId(); |
||
| 26 | |||
| 27 | $this->assertRegExp('|[0-9]{9}+|', $result, 'Not big and random enough'); |
||
| 28 | } |
||
| 29 | |||
| 50 |