Answer the question
In order to leave comments, you need to log in
How to make a test and design a method?
Good afternoon.
There is an entity that stores balance sheets for several years:
$company = new Company(
$id = ID::generate(),
$name = new Name('Ромашка"'),
....
$accounting = [
new BalanceSheet('2017,'356743','-56913','189632','122733'),
new BalanceSheet('2018','76743','-16953','1492','233')
]
);
$accounting
refreshBalance
$company = (new CreateBuilder())
->withAccounting([
//year//
new BalanceSheet('2018','356743','-56913','189632','122733'),
new BalanceSheet('2018','76743','-16953','1492','233')
])
->build();
$company->refreshBalance($newBalance = new BalanceSheet('2018', '556743', '-56913', '189632', '122733'));
$this->assertEquals($newBalance, $company->getBalance('2018'));
getBalance($year) { return а что ретурн он должен?}
year
keyBalanceSheet('2018', ['556743', '-56913', '189632', '122733']))
? refreshBalance(new BalanceSheet('2018', ['556743', '-56913', '189632', '122733'])))
, and the method should check for `2018`? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question