mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06:00
Fixed some errors. Debug tests.
This commit is contained in:
parent
ba5db2c15f
commit
f72a8c5c06
@ -18,4 +18,4 @@ install:
|
||||
- php artisan migrate --seed
|
||||
|
||||
script:
|
||||
- phpunit
|
||||
- phpunit --debug
|
||||
|
@ -904,21 +904,18 @@ class TestData
|
||||
* @param User $user
|
||||
* @param $name
|
||||
*
|
||||
* @return Account|null
|
||||
* @return Account
|
||||
*/
|
||||
public static function findAccount(User $user, string $name)
|
||||
public static function findAccount(User $user, string $name): Account
|
||||
{
|
||||
/** @var Account $account */
|
||||
foreach ($user->accounts()->get() as $account) {
|
||||
if ($account->name == $name) {
|
||||
//Log::debug('Trying to find "' . $name . '" in "' . $account->name . '", and found it!');
|
||||
|
||||
return $account;
|
||||
}
|
||||
//Log::debug('Trying to find "' . $name . '" in "' . $account->name . '".');
|
||||
}
|
||||
|
||||
return null;
|
||||
return new Account;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user