Merge branch '2.7' into 2.8

* 2.7:
  [SecurityBundle] Skip SetAclCommandTest when sqlite is not available
This commit is contained in:
Nicolas Grekas 2015-08-27 15:34:10 +02:00
commit 6fd4019975
1 changed files with 17 additions and 14 deletions

View File

@ -30,6 +30,23 @@ class SetAclCommandTest extends WebTestCase
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
protected function setUp()
{
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
self::markTestSkipped('This test requires SQLite support in your environment');
}
parent::setUp();
$this->deleteTmpDir('Acl');
}
protected function tearDown()
{
parent::tearDown();
$this->deleteTmpDir('Acl');
}
public function testSetAclUser()
{
$objectId = 1;
@ -151,20 +168,6 @@ class SetAclCommandTest extends WebTestCase
$this->assertTrue($acl2->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity)));
}
protected function setUp()
{
parent::setUp();
$this->deleteTmpDir('Acl');
}
protected function tearDown()
{
parent::tearDown();
$this->deleteTmpDir('Acl');
}
private function getApplication()
{
$kernel = $this->createKernel(array('test_case' => 'Acl'));