From f72a8c5c06671c96081df00b012e569a7cd1a1b5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 5 Feb 2016 17:38:58 +0100 Subject: [PATCH] Fixed some errors. Debug tests. --- .travis.yml | 2 +- app/Support/Migration/TestData.php | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a8d6aca69..6472ddb017 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ install: - php artisan migrate --seed script: - - phpunit + - phpunit --debug diff --git a/app/Support/Migration/TestData.php b/app/Support/Migration/TestData.php index 780bcf558b..c488655083 100644 --- a/app/Support/Migration/TestData.php +++ b/app/Support/Migration/TestData.php @@ -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; } /**