Move integration tests to separate directory

Again, we do all of this to prepare for creating "real" test suites for
each type of tests.
This commit is contained in:
Franz Liedke 2019-01-01 22:17:09 +01:00
parent ba16ebe61f
commit 4d10536d35
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
26 changed files with 30 additions and 30 deletions

2
.gitignore vendored
View File

@ -4,6 +4,6 @@ composer.phar
node_modules
.DS_Store
Thumbs.db
/tests/tmp
/tests/integration/tmp
.vagrant
.idea/*

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Test\Concerns;
namespace Flarum\Tests\integration;
use Flarum\Database\DatabaseMigrationRepository;
use Flarum\Database\Migrator;
@ -57,9 +57,9 @@ trait CreatesForum
protected function createsSite()
{
$paths = [
'base' => __DIR__.'/../../tmp',
'public' => __DIR__.'/../../tmp/public',
'storage' => __DIR__.'/../../tmp/storage',
'base' => __DIR__.'/tmp',
'public' => __DIR__.'/tmp/public',
'storage' => __DIR__.'/tmp/storage',
];
if ($this->isInstalled) {

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Test\Concerns;
namespace Flarum\Tests\integration;
use Flarum\Api\Client;
use Flarum\User\Guest;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Test\Concerns;
namespace Flarum\Tests\integration;
use Flarum\Post\CommentPost;
use Flarum\Post\Event\Posted;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Test\Concerns;
namespace Flarum\Tests\integration;
use Flarum\User\User;

View File

@ -9,14 +9,14 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Test;
namespace Flarum\Tests\integration;
use PHPUnit\Framework\TestCase as Test;
abstract class TestCase extends Test
{
use Concerns\CreatesForum,
Concerns\MakesApiRequests;
use CreatesForum,
MakesApiRequests;
public function setUp()
{

View File

@ -9,13 +9,13 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Auth;
namespace Flarum\Tests\integration\api\Auth;
use Carbon\Carbon;
use Flarum\Api\ApiKey;
use Flarum\Api\Controller\CreateGroupController;
use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers;
use Flarum\Tests\Test\TestCase;
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
use Flarum\Tests\integration\TestCase;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;

View File

@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers;
use Flarum\Tests\Test\TestCase;
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
use Flarum\Tests\integration\TestCase;
use Flarum\User\User;
use Illuminate\Support\Arr;
use Psr\Http\Message\ResponseInterface;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\CreateDiscussionController;
use Flarum\Discussion\Discussion;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\CreateGroupController;
use Flarum\Group\Group;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\CreatePostController;
use Flarum\Discussion\Discussion;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\CreateTokenController;
use Flarum\Http\AccessToken;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\CreateUserController;
use Flarum\Settings\SettingsRepositoryInterface;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\DeleteDiscussionController;
use Flarum\Discussion\Discussion;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\ListDiscussionsController;
use Flarum\Discussion\Discussion;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\ListGroupsController;
use Flarum\Group\Group;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\ListNotificationsController;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\ListUsersController;

View File

@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\ShowDiscussionController;
use Flarum\Discussion\Discussion;
use Flarum\Tests\Test\Concerns\ManagesContent;
use Flarum\Tests\integration\ManagesContent;
class ShowDiscussionControllerTest extends ApiControllerTestCase
{

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Flarum\Tests\Api\Controller;
namespace Flarum\Tests\integration\api\Controller;
use Flarum\Api\Controller\UpdateUserController;