mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Update test code.
This commit is contained in:
@@ -35,7 +35,7 @@ class AuthenticateTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Authenticate
|
||||
*/
|
||||
public function testMiddleware()
|
||||
public function testMiddleware(): void
|
||||
{
|
||||
Log::debug('Now at testMiddleware');
|
||||
$response = $this->get('/_test/authenticate');
|
||||
@@ -46,7 +46,7 @@ class AuthenticateTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Authenticate
|
||||
*/
|
||||
public function testMiddlewareAjax()
|
||||
public function testMiddlewareAjax(): void
|
||||
{
|
||||
Log::debug('Now at testMiddlewareAjax');
|
||||
$server = ['HTTP_X-Requested-With' => 'XMLHttpRequest'];
|
||||
@@ -57,7 +57,7 @@ class AuthenticateTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Authenticate
|
||||
*/
|
||||
public function testMiddlewareAuth()
|
||||
public function testMiddlewareAuth(): void
|
||||
{
|
||||
Log::debug('Now at testMiddlewareAuth');
|
||||
$this->be($this->user());
|
||||
@@ -68,7 +68,7 @@ class AuthenticateTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Authenticate
|
||||
*/
|
||||
public function testMiddlewareBlockedUser()
|
||||
public function testMiddlewareBlockedUser(): void
|
||||
{
|
||||
Log::debug('Now at testMiddlewareBlockedUser');
|
||||
$user = $this->user();
|
||||
@@ -85,7 +85,7 @@ class AuthenticateTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Authenticate
|
||||
*/
|
||||
public function testMiddlewareEmail()
|
||||
public function testMiddlewareEmail(): void
|
||||
{
|
||||
Log::debug('Now at testMiddlewareEmail');
|
||||
$user = $this->user();
|
||||
|
@@ -38,7 +38,7 @@ class AuthenticateTwoFactorTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle
|
||||
*/
|
||||
public function testMiddleware()
|
||||
public function testMiddleware(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$response = $this->get('/_test/authenticate');
|
||||
@@ -56,7 +56,7 @@ class AuthenticateTwoFactorTest extends TestCase
|
||||
*
|
||||
* @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle
|
||||
*/
|
||||
public function testMiddlewareNoTwoFA()
|
||||
public function testMiddlewareNoTwoFA(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$user = $this->user();
|
||||
@@ -87,7 +87,7 @@ class AuthenticateTwoFactorTest extends TestCase
|
||||
*
|
||||
* @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle
|
||||
*/
|
||||
public function testMiddlewareTwoFAAuthed()
|
||||
public function testMiddlewareTwoFAAuthed(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$user = $this->user();
|
||||
@@ -120,7 +120,7 @@ class AuthenticateTwoFactorTest extends TestCase
|
||||
*
|
||||
* @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle
|
||||
*/
|
||||
public function testMiddlewareTwoFANoSecret()
|
||||
public function testMiddlewareTwoFANoSecret(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$user = $this->user();
|
||||
@@ -151,7 +151,7 @@ class AuthenticateTwoFactorTest extends TestCase
|
||||
*
|
||||
* @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle
|
||||
*/
|
||||
public function testMiddlewareTwoFASecret()
|
||||
public function testMiddlewareTwoFASecret(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$user = $this->user();
|
||||
|
@@ -36,7 +36,7 @@ class IsAdminTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsAdmin::handle
|
||||
*/
|
||||
public function testMiddleware()
|
||||
public function testMiddleware(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$response = $this->get('/_test/is-admin');
|
||||
@@ -47,7 +47,7 @@ class IsAdminTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsAdmin::handle
|
||||
*/
|
||||
public function testMiddlewareAjax()
|
||||
public function testMiddlewareAjax(): void
|
||||
{
|
||||
$server = ['HTTP_X-Requested-With' => 'XMLHttpRequest'];
|
||||
$this->withoutExceptionHandling();
|
||||
@@ -58,7 +58,7 @@ class IsAdminTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsAdmin::handle
|
||||
*/
|
||||
public function testMiddlewareNotOwner()
|
||||
public function testMiddlewareNotOwner(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$this->be($this->emptyUser());
|
||||
@@ -70,7 +70,7 @@ class IsAdminTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsAdmin::handle
|
||||
*/
|
||||
public function testMiddlewareOwner()
|
||||
public function testMiddlewareOwner(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->withoutExceptionHandling();
|
||||
|
@@ -37,7 +37,7 @@ class IsDemoUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareAuthenticated()
|
||||
public function testMiddlewareAuthenticated(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get('/_test/is-demo');
|
||||
@@ -47,7 +47,7 @@ class IsDemoUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated()
|
||||
public function testMiddlewareNotAuthenticated(): void
|
||||
{
|
||||
$response = $this->get('/_test/is-demo');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
@@ -56,7 +56,7 @@ class IsDemoUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareIsDemoUser()
|
||||
public function testMiddlewareIsDemoUser(): void
|
||||
{
|
||||
$this->be($this->demoUser());
|
||||
$response = $this->get('/_test/is-demo');
|
||||
|
@@ -36,7 +36,7 @@ class IsSandstormUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated()
|
||||
public function testMiddlewareNotAuthenticated(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$response = $this->get('/_test/is-sandstorm');
|
||||
@@ -46,7 +46,7 @@ class IsSandstormUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle
|
||||
*/
|
||||
public function testMiddlewareNotSandStorm()
|
||||
public function testMiddlewareNotSandStorm(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$this->be($this->user());
|
||||
@@ -57,7 +57,7 @@ class IsSandstormUserTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle
|
||||
*/
|
||||
public function testMiddlewareSandstorm()
|
||||
public function testMiddlewareSandstorm(): void
|
||||
{
|
||||
putenv('SANDSTORM=1');
|
||||
$this->withoutExceptionHandling();
|
||||
|
@@ -38,7 +38,7 @@ class RangeTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Range
|
||||
*/
|
||||
public function testMiddlewareAuthenticated()
|
||||
public function testMiddlewareAuthenticated(): void
|
||||
{
|
||||
$repository = $this->mock(JournalRepositoryInterface::class);
|
||||
$repository->shouldReceive('firstNull')->andReturn(TransactionJournal::first());
|
||||
@@ -56,7 +56,7 @@ class RangeTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\Range
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated()
|
||||
public function testMiddlewareNotAuthenticated(): void
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
$response = $this->get('/_test/range');
|
||||
|
@@ -38,7 +38,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle
|
||||
*/
|
||||
public function testMiddleware()
|
||||
public function testMiddleware(): void
|
||||
{
|
||||
$response = $this->get('/_test/authenticate');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
@@ -47,7 +47,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle
|
||||
*/
|
||||
public function testMiddlewareAuthenticated()
|
||||
public function testMiddlewareAuthenticated(): void
|
||||
{
|
||||
// pref for has 2fa is true
|
||||
$preference = new Preference;
|
||||
@@ -71,7 +71,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle
|
||||
*/
|
||||
public function testMiddlewareLightAuth()
|
||||
public function testMiddlewareLightAuth(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get('/_test/authenticate');
|
||||
|
@@ -36,7 +36,7 @@ class RedirectIfAuthenticatedTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\RedirectIfAuthenticated::handle
|
||||
*/
|
||||
public function testMiddleware()
|
||||
public function testMiddleware(): void
|
||||
{
|
||||
$response = $this->get('/_test/authenticate');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
@@ -45,7 +45,7 @@ class RedirectIfAuthenticatedTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\RedirectIfAuthenticated::handle
|
||||
*/
|
||||
public function testMiddlewareAuthenticated()
|
||||
public function testMiddlewareAuthenticated(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get('/_test/authenticate');
|
||||
|
Reference in New Issue
Block a user