mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 22:46:13 +00:00
Removing view test from PersonControllerUpdateTest.php
This commit is contained in:
parent
91bd7a4529
commit
91e133aec6
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Tests\Controller;
|
namespace Chill\PersonBundle\Tests\Controller;
|
||||||
|
|
||||||
|
//ini_set('memory_limit', '-1');
|
||||||
|
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
|
|
||||||
@ -85,22 +87,17 @@ class PersonControllerUpdateTest extends WebTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the view & edit page are accessible
|
* Test the edit page are accessible
|
||||||
*/
|
*/
|
||||||
public function testEditPageIsSuccessful()
|
public function testEditPageIsSuccessful()
|
||||||
{
|
{
|
||||||
$this->client->request('GET', $this->viewUrl);
|
|
||||||
$this->assertTrue($this->client->getResponse()->isSuccessful(),
|
|
||||||
"The person view form is accessible");
|
|
||||||
|
|
||||||
|
|
||||||
$this->client->request('GET', $this->editUrl);
|
$this->client->request('GET', $this->editUrl);
|
||||||
$this->assertTrue($this->client->getResponse()->isSuccessful(),
|
$this->assertTrue($this->client->getResponse()->isSuccessful(),
|
||||||
"The person edit form is accessible");
|
"The person edit form is accessible");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the view & edit page of a given person are not accessible for a user
|
* Test if the edit page of a given person is not accessible for a user
|
||||||
* of another center of the person
|
* of another center of the person
|
||||||
*/
|
*/
|
||||||
public function testEditPageDeniedForUnauthorized_OutsideCenter()
|
public function testEditPageDeniedForUnauthorized_OutsideCenter()
|
||||||
@ -110,10 +107,6 @@ class PersonControllerUpdateTest extends WebTestCase
|
|||||||
'PHP_AUTH_PW' => 'password',
|
'PHP_AUTH_PW' => 'password',
|
||||||
));
|
));
|
||||||
|
|
||||||
$client->request('GET', $this->viewUrl);
|
|
||||||
$this->assertEquals(403, $client->getResponse()->getStatusCode(),
|
|
||||||
"The view page of a person of a center A must not be accessible for user of center B");
|
|
||||||
|
|
||||||
$client->request('GET', $this->editUrl);
|
$client->request('GET', $this->editUrl);
|
||||||
$this->assertEquals(403, $client->getResponse()->getStatusCode(),
|
$this->assertEquals(403, $client->getResponse()->getStatusCode(),
|
||||||
"The edit page of a person of a center A must not be accessible for user of center B");
|
"The edit page of a person of a center A must not be accessible for user of center B");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user