Skip to content

Instantly share code, notes, and snippets.

@kjdev
Created May 22, 2015 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjdev/a6301834b8c2937e2b32 to your computer and use it in GitHub Desktop.
Save kjdev/a6301834b8c2937e2b32 to your computer and use it in GitHub Desktop.
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