public function testConstructor() { $credit = new Credit($instruction = $this->getInstruction(), 100.23); $this->assertSame($instruction, $credit->getPaymentInstruction()); $this->assertEquals(0.0, $credit->getCreditedAmount()); $this->assertEquals(0.0, $credit->getCreditingAmount()); $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $credit->getTransactions()); $this->assertEquals(0, count($credit->getTransactions())); $this->assertEquals(0.0, $credit->getReversingAmount()); $this->assertSame(CreditInterface::STATE_NEW, $credit->getState()); $this->assertEquals(100.23, $credit->getTargetAmount()); $this->assertFalse($credit->isAttentionRequired()); $this->assertNull($credit->getId()); }