8000 minor #15631 [SecurityBundle] Skip SetAclCommandTest when sqlite is n… · symfony/symfony@8ae3dec · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ae3dec

Browse files
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
2 parents 283ba52 + 95961a5 commit 8ae3dec

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ class SetAclCommandTest extends WebTestCase
3030
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
3131
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
3232

33+
protected function setUp()
34+
{
35+
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
36+
self::markTestSkipped('This test requires SQLite support in your environment');
37+
}
38+
parent::setUp();
39+
40+
$this->deleteTmpDir('Acl');
41+
}
42+
43+
protected function tearDown()
44+
{
45+
parent::tearDown();
46+
47+
$this->deleteTmpDir('Acl');
48+
}
49+
3350
public function testSetAclUser()
3451
{
3552
$objectId = 1;
@@ -151,20 +168,6 @@ public function testSetAclClassScope()
151168
$this->assertTrue($acl2->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity)));
152169
}
153170

154-
protected function setUp()
155-
{
156-
parent::setUp();
157-
158-
$this->deleteTmpDir('Acl');
159-
}
160-
161-
protected function tearDown()
162-
{
163-
parent::tearDown();
164-
165-
$this->deleteTmpDir('Acl');
166-
}
167-
168171
private function getApplication()
169172
{
170173
$kernel = $this->createKernel(array('test_case' => 'Acl'));

0 commit comments

Comments
 (0)
0