summaryrefslogtreecommitdiffstats
path: root/Acl/Tests
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-05-15 16:11:12 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-05-15 16:11:12 +0200
commita3c3bf47ffef13bb4646f0c7b7971cce399d5950 (patch)
treebbc8859d18aee3c4fb90945dbf0ef69cb7a5bf07 /Acl/Tests
parentbe8e01596f133c2c950b011fe8b0e261dc6c6f34 (diff)
parent34bcfc3debc0b7e1fbc68b1bedf98e21163f4967 (diff)
downloadsymfony-security-a3c3bf47ffef13bb4646f0c7b7971cce399d5950.zip
symfony-security-a3c3bf47ffef13bb4646f0c7b7971cce399d5950.tar.gz
symfony-security-a3c3bf47ffef13bb4646f0c7b7971cce399d5950.tar.bz2
Merge branch '2.7' into 2.8
* 2.7: fixed CS fixed CS fixed CS Fix WebProfilerBundle compatiblity with HttpKernel < 2.7 [Validator] Deprecated PHP7-incompatible constraints and related validators [DebugBundle] Allow alternative destination for dumps [DebugBundle] Use output mechanism of dumpers instead of echoing [DebugBundle] Always collect dumps [FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands Fix tests in HHVM CS: Pre incrementation/decrementation should be used if possible Conflicts: src/Symfony/Bundle/FrameworkBundle/composer.json
Diffstat (limited to 'Acl/Tests')
-rw-r--r--Acl/Tests/Dbal/AclProviderBenchmarkTest.php8
-rw-r--r--Acl/Tests/Dbal/AclProviderTest.php2
-rw-r--r--Acl/Tests/Domain/DoctrineAclCacheTest.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/Acl/Tests/Dbal/AclProviderBenchmarkTest.php b/Acl/Tests/Dbal/AclProviderBenchmarkTest.php
index 1f96752..c95b474 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) {
@@ -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 {
@@ -226,7 +226,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
while ($i <= 30) {
$mask |= 1 << rand(0, 30);
- $i++;
+ ++$i;
}
return $mask;
diff --git a/Acl/Tests/Dbal/AclProviderTest.php b/Acl/Tests/Dbal/AclProviderTest.php
index 717a258..9470d80 100644
--- a/Acl/Tests/Dbal/AclProviderTest.php
+++ b/Acl/Tests/Dbal/AclProviderTest.php
@@ -130,7 +130,7 @@ class AclProviderTest extends \PHPUnit_Framework_TestCase
$i = 0;
foreach ($aces as $index => $ace) {
$this->assertEquals($i, $index);
- $i++;
+ ++$i;
}
$sid = $aces[0]->getSecurityIdentity();
diff --git a/Acl/Tests/Domain/DoctrineAclCacheTest.php b/Acl/Tests/Domain/DoctrineAclCacheTest.php
index 128f2c8..255f7f4 100644
--- a/Acl/Tests/Domain/DoctrineAclCacheTest.php
+++ b/Acl/Tests/Domain/DoctrineAclCacheTest.php
@@ -72,7 +72,7 @@ class DoctrineAclCacheTest extends \PHPUnit_Framework_TestCase
$acl->insertClassFieldAce('foo', $sid, 1);
$acl->insertObjectAce($sid, 1);
$acl->insertObjectFieldAce('foo', $sid, 1);
- $id++;
+ ++$id;
if ($depth > 0) {
$acl->setParentAcl($this->getAcl($depth - 1));