Fixed some errors. Debug tests.

This commit is contained in:
James Cole 2016-02-05 17:38:58 +01:00
parent ba5db2c15f
commit f72a8c5c06
2 changed files with 4 additions and 7 deletions

View File

@ -18,4 +18,4 @@ install:
- php artisan migrate --seed
script:
- phpunit
- phpunit --debug

View File

@ -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;
}
/**