Code cleanup and realign.

This commit is contained in:
James Cole
2018-08-06 19:14:30 +02:00
parent f7eef25fed
commit 5908c0ce8c
188 changed files with 1019 additions and 1031 deletions

View File

@@ -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
*/

View File

@@ -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();

View File

@@ -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
*/

View File

@@ -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