public function testHelperRendersTransaction() { $transaction = new Transaction(123, 12.55); $transaction->setAffiliation('Affiliation'); $transaction->setTax(9.66); $transaction->setShipping(3.22); $transaction->setCity('City'); $transaction->setState('State'); $transaction->setCountry('Country'); $this->tracker->addTransaction($transaction); $expected = '_gaq.push(["_addTrans",123,"Affiliation",12.55,9.66,3.22,"City","State","Country"])'; $actual = $this->script->getCode(); $this->assertContains($expected, $actual); }