mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup and realign.
This commit is contained in:
@@ -23,10 +23,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\Unit\Middleware;
|
||||
|
||||
use Log;
|
||||
use Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Tests\TestCase;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AuthenticateTest
|
||||
*/
|
||||
|
@@ -534,7 +534,7 @@ class BinderTest extends TestCase
|
||||
);
|
||||
|
||||
// mock fiscal helper:
|
||||
$date = new Carbon;
|
||||
$date = new Carbon;
|
||||
$helper = $this->mock(FiscalHelperInterface::class);
|
||||
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
|
||||
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
|
||||
|
@@ -44,15 +44,6 @@ class IsDemoUserTest extends TestCase
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated(): void
|
||||
{
|
||||
$response = $this->get('/_test/is-demo');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
@@ -64,6 +55,15 @@ class IsDemoUserTest extends TestCase
|
||||
$response->assertSessionHas('info');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated(): void
|
||||
{
|
||||
$response = $this->get('/_test/is-demo');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up test
|
||||
*/
|
||||
|
@@ -25,10 +25,10 @@ namespace Tests\Unit\Middleware;
|
||||
|
||||
use FireflyIII\Http\Middleware\Sandstorm;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Mockery;
|
||||
use Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Tests\TestCase;
|
||||
use Mockery;
|
||||
|
||||
/**
|
||||
* Class RangeTest
|
||||
|
Reference in New Issue
Block a user