diff options
Diffstat (limited to 'Acl/Tests/Dbal')
-rw-r--r-- | Acl/Tests/Dbal/AclProviderBenchmarkTest.php | 8 | ||||
-rw-r--r-- | Acl/Tests/Dbal/MutableAclProviderTest.php | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Acl/Tests/Dbal/AclProviderBenchmarkTest.php b/Acl/Tests/Dbal/AclProviderBenchmarkTest.php index 8f68f1f..c7383dc 100644 --- a/Acl/Tests/Dbal/AclProviderBenchmarkTest.php +++ b/Acl/Tests/Dbal/AclProviderBenchmarkTest.php @@ -92,7 +92,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); $this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)'); - for ($i=0; $i<40000; $i++) { + for ($i = 0; $i<40000; $i++) { $this->generateAclHierarchy(); } } @@ -107,7 +107,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase protected function generateAclLevel($depth, $parentId, $ancestors) { $level = count($ancestors); - for ($i=0,$t=rand(1, 10); $i<$t; $i++) { + for ($i = 0,$t = rand(1, 10); $i<$t; $i++) { $id = $this->generateAcl($this->chooseClassId(), $parentId, $ancestors); if ($level < $depth) { @@ -161,7 +161,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $this->insertSidStmt->execute(array( $id, $this->getRandomString(rand(5, 30)), - rand(0, 1) + rand(0, 1), )); $id += 1; @@ -178,7 +178,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $sids = array(); $fieldOrder = array(); - for ($i=0; $i<=30; $i++) { + for ($i = 0; $i <= 30; $i++) { $fieldName = rand(0, 1) ? null : $this->getRandomString(rand(10, 20)); do { diff --git a/Acl/Tests/Dbal/MutableAclProviderTest.php b/Acl/Tests/Dbal/MutableAclProviderTest.php index 8c920cf..f0a68a0 100644 --- a/Acl/Tests/Dbal/MutableAclProviderTest.php +++ b/Acl/Tests/Dbal/MutableAclProviderTest.php @@ -88,7 +88,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->findAcl($oid); $this->fail('ACL has not been properly deleted.'); - } catch (AclNotFoundException $notFound) { } + } catch (AclNotFoundException $notFound) { + } } public function testDeleteAclDeletesChildren() @@ -103,7 +104,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->findAcl(new ObjectIdentity(1, 'Foo')); $this->fail('Child-ACLs have not been deleted.'); - } catch (AclNotFoundException $notFound) { } + } catch (AclNotFoundException $notFound) { + } } public function testFindAclsAddsPropertyListener() @@ -148,7 +150,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase 'parent' => array( 'object_identifier' => '1', 'class_type' => 'anotherFoo', - ) + ), )); $propertyChanges = $this->getField($provider, 'propertyChanges'); @@ -288,7 +290,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->updateAcl($acl1); $this->fail('Provider failed to detect a concurrent modification.'); - } catch (ConcurrentModificationException $ex) { } + } catch (ConcurrentModificationException $ex) { + } } public function testUpdateAcl() |