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()); }
public function accountTypesThatHaveBalance() { return [[AccountType::DR()], [AccountType::CR()], [AccountType::ASSET()], [AccountType::LIABILITY()], [AccountType::BANK()], [AccountType::CUSTOMER()], [AccountType::EQUITY()], [AccountType::EXPENSE()], [AccountType::INCOME()], [AccountType::SUPPLIER()]]; }
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())); }
public function testGettingTheParentIdOfAnAccountThatHasAParentWillReturnTheParentId() { $ac1 = new Account($this->sut, new Nominal('9998'), AccountType::ASSET(), new StringType('Asset')); $this->sut->addAccount($ac1); $ac2 = new Account($this->sut, new Nominal('9999'), AccountType::ASSET(), new StringType('Asset-2')); $this->sut->addAccount($ac2, $ac1->getId()); $f = $this->sut->getParentId($ac2->getId()); $b = $f->get(); $this->assertEquals('9998', $this->sut->getParentId($ac2->getId())->get()); }