route = new AccountsRoute($I); } public function testSubmitNewEmail(FunctionalTester $I) { Mock::func(EmailValidator::class, 'checkdnsrr')->andReturnTrue(); $I->wantTo('submit new email'); $id = $I->amAuthenticated('ILLIMUNATI'); $this->route->changeEmailSubmitNewEmail($id, 'H27HBDCHHAG2HGHGHS', 'my-new-email@ely.by'); $I->canSeeResponseCodeIs(200); $I->canSeeResponseIsJson(); $I->canSeeResponseContainsJson([ 'success' => true, ]); } }