Created
October 22, 2010 15:19
-
-
Save mrmorris/640746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @var array | |
*/ | |
public $fixtures = array(); | |
/** | |
* List of plugin fixtures to always include | |
* @var array | |
*/ | |
public $plugin_fixtures = array( | |
'plugin.messaging.message', | |
'plugin.messaging.message_deployment' | |
); | |
/** | |
* @return void | |
*/ | |
public function __construct() { | |
if (get_class($this) != 'HlTestCase') { | |
$fixtures = Cache::read('all', 'fixtures'); | |
if (empty($fixtures)) { | |
$folder = new Folder(TESTS . 'fixtures'); | |
$contents = $folder->read(); | |
$fixtures = array(); | |
foreach($contents[1] as $file) { | |
$fixtures[] = 'app.'.str_replace('_fixture.php', '', $file); | |
} | |
Cache::write('all', $fixtures, 'fixtures'); | |
} | |
$this->fixtures = array_merge($fixtures, $this->fixtures); | |
$this->fixtures = array_merge($this->fixtures, $this->plugin_fixtures); | |
} | |
parent::__construct(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment