2018-03-03 08:12:18 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* UserControllerTest.php
|
2020-02-16 13:59:55 +01:00
|
|
|
* Copyright (c) 2019 james@firefly-iii.org
|
2018-03-03 08:12:18 +01:00
|
|
|
*
|
2019-10-02 06:45:03 +02:00
|
|
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
2018-03-03 08:12:18 +01:00
|
|
|
*
|
2019-10-02 06:45:03 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2018-03-03 08:12:18 +01:00
|
|
|
*
|
2019-10-02 06:45:03 +02:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2018-03-03 08:12:18 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2019-10-02 06:45:03 +02:00
|
|
|
* GNU Affero General Public License for more details.
|
2018-03-03 08:12:18 +01:00
|
|
|
*
|
2019-10-02 06:45:03 +02:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-03-03 08:12:18 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Tests\Api\V1\Controllers;
|
|
|
|
|
|
|
|
|
2018-03-03 10:15:39 +01:00
|
|
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
2018-12-16 13:55:19 +01:00
|
|
|
use FireflyIII\Transformers\UserTransformer;
|
2018-03-03 10:15:39 +01:00
|
|
|
use FireflyIII\User;
|
|
|
|
use Laravel\Passport\Passport;
|
|
|
|
use Log;
|
2018-07-13 06:12:39 +02:00
|
|
|
use Mockery;
|
2018-03-03 08:12:18 +01:00
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class UserControllerTest
|
2019-06-09 09:39:56 +02:00
|
|
|
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
|
|
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
|
|
|
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
|
2018-03-03 08:12:18 +01:00
|
|
|
*/
|
|
|
|
class UserControllerTest extends TestCase
|
|
|
|
{
|
|
|
|
|
2018-03-03 10:15:39 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-09-02 20:27:26 +02:00
|
|
|
public function setUp(): void
|
2018-03-03 10:15:39 +01:00
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
Passport::actingAs($this->user());
|
2020-03-15 15:32:09 +01:00
|
|
|
$this->mockDefaultConfiguration();
|
2019-04-09 20:05:20 +02:00
|
|
|
Log::info(sprintf('Now in %s.', get_class($this)));
|
2018-03-03 10:15:39 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-07-01 09:27:22 +02:00
|
|
|
* Store new user.
|
|
|
|
*
|
|
|
|
* @covers \FireflyIII\Api\V1\Controllers\UserController
|
2019-08-29 21:32:50 +02:00
|
|
|
* @covers \FireflyIII\Api\V1\Requests\UserStoreRequest
|
2018-03-03 10:15:39 +01:00
|
|
|
*/
|
2018-05-11 19:58:10 +02:00
|
|
|
public function testStoreBasic(): void
|
2018-03-03 10:15:39 +01:00
|
|
|
{
|
2020-07-30 21:16:14 +02:00
|
|
|
$this->assertTrue(true);
|
2018-03-03 10:15:39 +01:00
|
|
|
}
|
|
|
|
|
2018-03-04 15:14:29 +01:00
|
|
|
}
|