minor #15631 [SecurityBundle] Skip SetAclCommandTest when sqlite is not available (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Skip SetAclCommandTest when sqlite is not available

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

95961a5 [SecurityBundle] Skip SetAclCommandTest when sqlite is not available
This commit is contained in:
Nicolas Grekas 2015-08-27 15:33:52 +02:00
commit 8ae3dec060
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'));