public function testCanGetValuesAsClassesUsingStaticMethods() { $this->assertInstanceOf('SAccounts\\AccountType', AccountType::REAL()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::CR()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::DR()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::ASSET()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::BANK()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::CUSTOMER()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::EXPENSE()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::INCOME()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::LIABILITY()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::EQUITY()); $this->assertInstanceOf('SAccounts\\AccountType', AccountType::SUPPLIER()); }
/** * @expectedException SAccounts\AccountsException */ public function testGettingBalanceOfARealAccountTypeWillThrowAnException() { $this->sut = new Account($this->chart, new Nominal('9999'), AccountType::REAL(), new StringType('foo')); $this->sut->getBalance(); }
public function invalidAccountTypes() { return array(array(AccountType::ASSET()), array(AccountType::BANK()), array(AccountType::CUSTOMER()), array(AccountType::EQUITY()), array(AccountType::EXPENSE()), array(AccountType::INCOME()), array(AccountType::LIABILITY()), array(AccountType::REAL()), array(AccountType::SUPPLIER())); }