Permalink
Browse files

Add configuration flags for toggling mapper implementation tests

  • Loading branch information...
1 parent 5c61d48 commit 03a91aae24d78e9bdfb829f017cb56a7235a0585 @adamlundrigan adamlundrigan committed Oct 25, 2012
View
24 tests/CdliTwoStageSignupTest/Framework/TestCaseOptions.php
@@ -7,6 +7,8 @@ class TestCaseOptions extends AbstractOptions
{
protected $databaseSchemaUp;
protected $databaseSchemaDown;
+ protected $enableZendDbTests;
+ protected $enableDoctrineOrmTests;
public function setDatabaseSchemaUp($schema)
{
@@ -27,4 +29,26 @@ public function getDatabaseSchemaDown()
{
return $this->databaseSchemaDown;
}
+
+ public function setEnableZendDbTests($tf)
+ {
+ $this->enableZendDbTests = ($tf == true);
+ return $this;
+ }
+
+ public function getEnableZendDbTests()
+ {
+ return $this->enableZendDbTests;
+ }
+
+ public function setEnableDoctrineOrmTests($tf)
+ {
+ $this->enableDoctrineOrmTests = ($tf == true);
+ return $this;
+ }
+
+ public function getEnableDoctrineOrmTests()
+ {
+ return $this->enableDoctrineOrmTests;
+ }
}
View
4 tests/CdliTwoStageSignupTest/Mapper/DoctrineORMMapperTest.php
@@ -12,6 +12,10 @@ public function setUp()
{
parent::setUp();
+ if (!$this->getOptions()->getEnableDoctrineOrmTests()) {
+ $this->markTestSkipped('Doctrine ORM mapper tests are disabled');
+ }
+
// Override the selected backend adapter
$sl = $this->getServiceLocator();
if ($sl instanceof ServiceManager) {
View
4 tests/CdliTwoStageSignupTest/Mapper/ZendDbMapperTest.php
@@ -13,6 +13,10 @@ public function setUp()
{
parent::setUp();
+ if (!$this->getOptions()->getEnableZendDbTests()) {
+ $this->markTestSkipped('Zend\Db mapper tests are disabled');
+ }
+
// Override the selected backend adapter
$sl = $this->getServiceLocator();
if ($sl instanceof ServiceManager) {
View
6 tests/config/database.local.php.dist
@@ -2,8 +2,10 @@
return array(
'cdli-twostagesignup-test' => array(
- 'database_schema_up' => 'schema_up.sqlite.sql',
- 'database_schema_down' => 'schema_down.sql',
+ 'database_schema_up' => 'schema_up.sqlite.sql',
+ 'database_schema_down' => 'schema_down.sql',
+ 'enable_zend_db_tests' => true,
+ 'enable_doctrine_orm_tests' => false,
),
'service_manager' => array(
'factories' => array(

0 comments on commit 03a91aa

Please sign in to comment.