mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-12 04:38:06 +00:00
Code cleanup
This commit is contained in:
@@ -85,7 +85,7 @@ class StageNewHandlerTest extends TestCase
|
||||
// create fake bunq object:
|
||||
$setting = new MonetaryAccountSetting(null, null, null);
|
||||
$mab = new BunqMonetaryAccountBank('EUR', 'Some descr', null, null, null, null, null, null, null, null);
|
||||
$ma = new BunqMonetaryAccount;
|
||||
$monAcc = new BunqMonetaryAccount;
|
||||
$alias = new Pointer('a', 'b', null);
|
||||
|
||||
|
||||
@@ -96,10 +96,10 @@ class StageNewHandlerTest extends TestCase
|
||||
$setting->setColor('FFFFFF');
|
||||
$mab->setSetting($setting);
|
||||
$mab->setAlias([$alias]);
|
||||
$ma->setMonetaryAccountBank($mab);
|
||||
$monAcc->setMonetaryAccountBank($mab);
|
||||
|
||||
// response list.
|
||||
$list = new BunqResponseMonetaryAccountList([$ma], []);
|
||||
$list = new BunqResponseMonetaryAccountList([$monAcc], []);
|
||||
|
||||
$expectedConfig = [
|
||||
'accounts' => [
|
||||
@@ -172,7 +172,7 @@ class StageNewHandlerTest extends TestCase
|
||||
// create fake bunq object:
|
||||
$setting = new MonetaryAccountSetting(null, null, null);
|
||||
$maj = new MonetaryAccountJoint('EUR', [], 'Some descr', null, null, null, null, null, null, null, null);
|
||||
$ma = new BunqMonetaryAccount;
|
||||
$monAcc = new BunqMonetaryAccount;
|
||||
$alias = new Pointer('a', 'b', null);
|
||||
$labelUser = new LabelUser('x', 'James', 'NL');
|
||||
$coOwner = new CoOwner($alias);
|
||||
@@ -186,11 +186,11 @@ class StageNewHandlerTest extends TestCase
|
||||
$maj->setSetting($setting);
|
||||
$maj->setAlias([$alias]);
|
||||
$maj->setAllCoOwner([$coOwner]);
|
||||
$ma->setMonetaryAccountJoint($maj);
|
||||
$monAcc->setMonetaryAccountJoint($maj);
|
||||
$coOwner->setAlias($labelUser);
|
||||
|
||||
// response list.
|
||||
$list = new BunqResponseMonetaryAccountList([$ma], []);
|
||||
$list = new BunqResponseMonetaryAccountList([$monAcc], []);
|
||||
|
||||
$expectedConfig = [
|
||||
'accounts' => [
|
||||
@@ -264,7 +264,7 @@ class StageNewHandlerTest extends TestCase
|
||||
// create fake bunq object:
|
||||
$setting = new MonetaryAccountSetting(null, null, null);
|
||||
$mal = new MonetaryAccountLight('EUR', 'Some descr', null, null, null, null, null, null, null, null);
|
||||
$ma = new BunqMonetaryAccount;
|
||||
$monAcc = new BunqMonetaryAccount;
|
||||
$alias = new Pointer('a', 'b', null);
|
||||
|
||||
|
||||
@@ -275,10 +275,10 @@ class StageNewHandlerTest extends TestCase
|
||||
$setting->setColor('FFFFFF');
|
||||
$mal->setSetting($setting);
|
||||
$mal->setAlias([$alias]);
|
||||
$ma->setMonetaryAccountLight($mal);
|
||||
$monAcc->setMonetaryAccountLight($mal);
|
||||
|
||||
// response list.
|
||||
$list = new BunqResponseMonetaryAccountList([$ma], []);
|
||||
$list = new BunqResponseMonetaryAccountList([$monAcc], []);
|
||||
|
||||
$expectedConfig = [
|
||||
'accounts' => [
|
||||
|
||||
@@ -125,14 +125,14 @@ class MappedValuesValidatorTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param int $objectId
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
private function objectWithId(int $id): stdClass
|
||||
private function objectWithId(int $objectId): stdClass
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->id = $id;
|
||||
$obj->id = $objectId;
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user