public function testSetGetCredit() { $transaction = new FinancialTransaction(); $credit = $this->getMock('JMS\\Payment\\CoreBundle\\Model\\CreditInterface'); $this->assertNull($transaction->getCredit()); $transaction->setCredit($credit); $this->assertSame($credit, $transaction->getCredit()); }