Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Phalcon 2.0.1 patch: Skip UnitTest yaml
--- a/cphalcon/unit-tests/ConfigTest.php
+++ b/cphalcon/unit-tests/ConfigTest.php
@@ -293,12 +293,22 @@ class ConfigTest extends PHPUnit_Framework_TestCase
public function testYamlConfig()
{
+ if (!extension_loaded('yaml')) {
+ $this->markTestSkipped('Warning: yaml extension is not loaded');
+ return false;
+ }
+
$config = new Phalcon\Config\Adapter\Yaml('unit-tests/config/config.yml');
$this->assertTrue($this->_compareConfig($this->_config, $config));
}
public function testYamlConfigCallback()
{
+ if (!extension_loaded('yaml')) {
+ $this->markTestSkipped('Warning: yaml extension is not loaded');
+ return false;
+ }
+
$config = new Phalcon\Config\Adapter\Yaml('unit-tests/config/config.yml', array(
'!decrypt' => function ($value) {
$crypt = new Phalcon\Crypt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.