. */ declare(strict_types=1); namespace Tests\Feature\Controllers; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Log; use Tests\TestCase; /** * Class NewUserControllerTest * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class NewUserControllerTest extends TestCase { /** * */ public function setUp() { parent::setUp(); Log::debug(sprintf('Now in %s.', get_class($this))); } /** * @covers \FireflyIII\Http\Controllers\NewUserController::index * @covers \FireflyIII\Http\Controllers\NewUserController::__construct */ public function testIndex() { // mock stuff $accountRepos = $this->mock(AccountRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $accountRepos->shouldReceive('count')->andReturn(0); $this->be($this->emptyUser()); $response = $this->get(route('new-user.index')); $response->assertStatus(200); $response->assertSee('