From 650708de9df9039f04eda0fc150bd94e5a5b9753 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 15:39:16 +0300 Subject: [PATCH] Fixed tests to be able run full test suite without Phalcon --- CHANGELOG.md | 2 ++ unit-tests/Extension/InternalClassesTest.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5354ea28e7..b68ed5ca75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fixed `zephir_preg_match` to use `ZVAL_NULL` instead of `ZEPHIR_NULL` [#1946](https://github.com/phalcon/zephir/issues/1946) +- Fixed `Extension\InternalClassesTest` test to be able run full test suite + without Phalcon [#1949](https://github.com/phalcon/zephir/issues/1949) ## [0.12.7] - 2019-10-03 ### Fixed diff --git a/unit-tests/Extension/InternalClassesTest.php b/unit-tests/Extension/InternalClassesTest.php index 6333a8666a..d5caee8e57 100644 --- a/unit-tests/Extension/InternalClassesTest.php +++ b/unit-tests/Extension/InternalClassesTest.php @@ -20,12 +20,20 @@ class InternalClassesTest extends TestCase { public function testStaticMethodCall() { + if (false === class_exists(Di::class)) { + $this->markTestSkipped('Class Phalcon\Di not found'); + } + $class = new InternalClasses(); $this->assertSame(Di::getDefault(), $class->testStaticCall()); } public function testStaticPropertyFetch() { + if (false === class_exists(Query::class)) { + $this->markTestSkipped('Class Phalcon\Mvc\Model\Query not found'); + } + $class = new InternalClasses(); $this->assertSame(Query::TYPE_DELETE, $class->testStaticPropertyFetch()); }