Improved data fixtures with Faker (#234)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\DataFixtures\AppFixtures;
|
||||
use App\DataFixtures\UserFixtures;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \App\Controller\InvoiceController
|
||||
@@ -19,20 +19,20 @@ class ProfileControllerTest extends ControllerBaseTest
|
||||
{
|
||||
public function testIsSecure()
|
||||
{
|
||||
$this->assertUrlIsSecured('/profile/' . AppFixtures::USERNAME_USER);
|
||||
$this->assertUrlIsSecured('/profile/' . UserFixtures::USERNAME_USER);
|
||||
}
|
||||
|
||||
public function testIndexAction()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser();
|
||||
$this->request($client, '/profile/' . AppFixtures::USERNAME_USER);
|
||||
$this->request($client, '/profile/' . UserFixtures::USERNAME_USER);
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
}
|
||||
|
||||
public function testIndexActionWithDifferentUsername()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser();
|
||||
$this->request($client, '/profile/' . AppFixtures::USERNAME_TEAMLEAD);
|
||||
$this->request($client, '/profile/' . UserFixtures::USERNAME_TEAMLEAD);
|
||||
$this->assertFalse($client->getResponse()->isSuccessful());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user