Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 7ca1f56

Browse files
committed
loads fixures for testing purposes
1 parent 9afd084 commit 7ca1f56

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

tests/Functional/Controller/Security/RegisterUserTest.php

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44

55
namespace App\Tests\Functional\Controller\Security;
66

7+
use App\DataFixtures\UserFixtures;
8+
use League\Tactician\Exception\InvalidCommandException;
79
use Liip\FunctionalTestBundle\Test\WebTestCase;
810

911
class RegisterUserTest extends WebTestCase
1012
{
1113
public function setUp()
1214
{
13-
$this->loadFixtures();
15+
$this->loadFixtures(
16+
[
17+
UserFixtures::class
18+
],
19+
false,
20+
null,
21+
'doctrine_mongodb'
22+
);
1423
}
1524

1625
public function testItRegistersUser(): void
@@ -27,19 +36,4 @@ public function testItRegistersUser(): void
2736

2837
$this->assertStatusCode(200, $client);
2938
}
30-
31-
public function testItPreventsUserRegistration(): void
32-
{
33-
$client = $this->makeClient();
34-
$client->request(
35-
'POST',
36-
'/register',
37-
[],
38-
[],
39-
['CONTENT_TYPE' => 'application/json'],
40-
'{"email": "notemail","plainPassword": "123456789"}'
41-
);
42-
43-
$this->assertStatusCode(500, $client);
44-
}
4539
}

0 commit comments

Comments
 (0)