Skip to content

Commit

Permalink
Add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Jan 11, 2020
1 parent af2d039 commit 80e91aa
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@
"twig/twig": "^2.4 || ^3.0"
},
"conflict": {
"doctrine/doctrine-bundle": "<1.12",
"doctrine/orm": "<2.7",
"symfony/doctrine-bridge": "<4.4"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"bamarni/composer-bin-plugin": "^1.3",
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
"doctrine/orm": "^2.7",
"ergebnis/composer-normalize": "^2.0.1",
"symfony/browser-kit": "^4.4 || ^5.0",
"symfony/doctrine-bridge": "^4.4 || ^5.0",
Expand Down
44 changes: 44 additions & 0 deletions tests/Action/RegisterActionIntegrationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

declare(strict_types=1);

/*
* This file is part of the NucleosProfileBundle package.
*
* (c) Christian Gripp <mail@core23.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Nucleos\ProfileBundle\Tests\Action;

use Nucleos\ProfileBundle\Tests\App\AppKernel;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

final class RegisterActionIntegrationTest extends WebTestCase
{
/**
* @var KernelBrowser
*/
private $client;

protected function setUp(): void
{
$this->client = static::createClient();
}

public function testLogin(): void
{
$this->client->followRedirects(true);
$this->client->request('GET', '/register');

static::assertResponseStatusCodeSame(200);
}

protected static function getKernelClass(): string
{
return AppKernel::class;
}
}
1 change: 1 addition & 0 deletions tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function getProjectDir(): string

protected function configureRoutes(RouteCollectionBuilder $routes): void
{
$routes->import('@NucleosUserBundle/Resources/config/routing/all.xml');
$routes->import(__DIR__.'/../../src/Resources/config/routing/all.xml');
}

Expand Down

0 comments on commit 80e91aa

Please sign in to comment.