| @@ 52-59 (lines=8) @@ | ||
| 49 | ||
| 50 | $refHttpCache = new \ReflectionClass('Symfony\Component\HttpKernel\HttpCache\HttpCache'); |
|
| 51 | // Workaround for Symfony 2.3 where $options property is not defined. |
|
| 52 | if (!$refHttpCache->hasProperty('options')) { |
|
| 53 | $mock->options = $options; |
|
| 54 | } else { |
|
| 55 | $refOptions = $refHttpCache |
|
| 56 | ->getProperty('options'); |
|
| 57 | $refOptions->setAccessible(true); |
|
| 58 | $refOptions->setValue($mock, $options); |
|
| 59 | } |
|
| 60 | ||
| 61 | return $mock; |
|
| 62 | } |
|
| @@ 50-57 (lines=8) @@ | ||
| 47 | ||
| 48 | $refHttpCache = new \ReflectionClass('Symfony\Component\HttpKernel\HttpCache\HttpCache'); |
|
| 49 | // Workaround for Symfony 2.3 where $options property is not defined. |
|
| 50 | if (!$refHttpCache->hasProperty('options')) { |
|
| 51 | $mock->options = $options; |
|
| 52 | } else { |
|
| 53 | $refOptions = $refHttpCache |
|
| 54 | ->getProperty('options'); |
|
| 55 | $refOptions->setAccessible(true); |
|
| 56 | $refOptions->setValue($mock, $options); |
|
| 57 | } |
|
| 58 | ||
| 59 | return $mock; |
|
| 60 | } |
|