| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class VisitorFixture { |
||
| 12 | |||
| 13 | public const VISITOR_TEST_IMPRESSION_COUNT = 5; |
||
| 14 | public const VISITOR_TEST_BUCKET = 'test_bucket'; |
||
| 15 | public const VISITOR_TEST_DONATION_HISTORY = false; |
||
| 16 | |||
| 17 | public static function getReturningVisitorRequest(): Request { |
||
| 18 | return new Request( |
||
| 19 | [], |
||
| 20 | [], |
||
| 21 | [], |
||
| 22 | [ |
||
| 23 | BannerSelectionController::IMPRESSION_COUNT_COOKIE => self::VISITOR_TEST_IMPRESSION_COUNT, |
||
| 24 | BannerSelectionController::BUCKET_COOKIE => self::VISITOR_TEST_BUCKET, |
||
| 25 | BannerSelectionController::DONATED_COOKIE => self::VISITOR_TEST_DONATION_HISTORY ] |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function getTestVisitor(): Visitor { |
||
| 30 | return new Visitor( |
||
| 31 | self::VISITOR_TEST_IMPRESSION_COUNT, |
||
| 32 | self::VISITOR_TEST_BUCKET, |
||
| 33 | self::VISITOR_TEST_DONATION_HISTORY |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | public static function getFirstTimeVisitor(): Visitor { |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |