summaryrefslogtreecommitdiffstats
path: root/650708de9df9039f04eda0fc150bd94e5a5b9753.patch
blob: fd815764be576726e014e3f0d0a5f40d5a55387f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 650708de9df9039f04eda0fc150bd94e5a5b9753 Mon Sep 17 00:00:00 2001
From: Serghei Iakovlev <sadhooklay@gmail.com>
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/unit-tests/Extension/InternalClassesTest.php b/unit-tests/Extension/InternalClassesTest.php
index 6333a8666..d5caee8e5 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());
     }