Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Security] cleaned up opt-in to benchmark test

  • Loading branch information...
commit 2d1d2ba8931434be489b63e8d82e5dbd02dd4400 1 parent 8438493
Kris Wallsmith kriswallsmith authored
6 phpunit.xml.dist
View
@@ -18,6 +18,12 @@
</testsuite>
</testsuites>
+ <groups>
+ <exclude>
+ <group>benchmark</group>
+ </exclude>
+ </groups>
+
<filter>
<whitelist>
<directory>./src/Symfony/</directory>
39 tests/Symfony/Tests/Component/Security/Acl/Dbal/AclProviderBenchmarkTest.php
View
@@ -17,6 +17,9 @@
use Symfony\Component\Security\Acl\Dbal\Schema;
use Doctrine\DBAL\DriverManager;
+/**
+ * @group benchmark
+ */
class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
{
protected $con;
@@ -26,9 +29,24 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
protected $insertOidStmt;
protected $insertEntryStmt;
+ protected function setUp()
+ {
+ $this->con = DriverManager::getConnection(array(
+ 'driver' => 'pdo_mysql',
+ 'host' => 'localhost',
+ 'user' => 'root',
+ 'dbname' => 'testdb',
+ ));
+ }
+
+ protected function tearDown()
+ {
+ $this->con = null;
+ }
+
public function testFindAcls()
{
-// $this->generateTestData();
+ // $this->generateTestData();
// get some random test object identities from the database
$oids = array();
@@ -45,25 +63,6 @@ public function testFindAcls()
echo "Total Time: ".$time."s\n";
}
-
- protected function setUp()
- {
- // comment the following line, and run only this test, if you need to benchmark
- $this->markTestSkipped();
-
- $this->con = DriverManager::getConnection(array(
- 'driver' => 'pdo_mysql',
- 'host' => 'localhost',
- 'user' => 'root',
- 'dbname' => 'testdb',
- ));
- }
-
- protected function tearDown()
- {
- $this->con = null;
- }
-
/**
* This generates a huge amount of test data to be used mainly for benchmarking
* purposes, not so much for testing. That's why it's not called by default.
Please sign in to comment.
Something went wrong with that request. Please try again.