Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function testGenerateFullTracker() |
||
29 | { |
||
30 | $tracker = new Tracker(); |
||
31 | $transaction = Transaction::createFromArray( |
||
32 | [ |
||
33 | 'id' => 1, |
||
34 | 'affiliation' => 'Acme Clothing', |
||
35 | 'revenue' => 99.99, |
||
36 | 'shipping' => 9.99, |
||
37 | 'tax' => 19.99, |
||
38 | 'currency' => 'RON', |
||
39 | ] |
||
40 | ); |
||
41 | |||
42 | self::assertSame( |
||
43 | "\n" |
||
44 | . 'ga("ecommerce:addTransaction",' |
||
45 | . '{"id":1,"affiliation":"Acme Clothing","revenue":99.99,"shipping":9.99,"tax":19.99,"currency":"RON"});', |
||
46 | AddTransactionCommand::generate($tracker, $transaction) |
||
47 | ); |
||
48 | } |
||
49 | } |
||
50 |