File: Skip-tests-that-require-not-available-libraries-or-PHP-ex.patch

package info (click to toggle)
phing 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,868 kB
  • sloc: php: 59,850; xml: 9,713; sql: 78; makefile: 39; sh: 14
file content (600 lines) | stat: -rw-r--r-- 26,995 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 13 Apr 2025 12:46:48 +0200
Subject: Skip tests that require not available libraries or PHP extensions

Origin: vendor
Forwarded: not-needed
---
 src/Phing/Listener/MonologListener.php                    |  7 +++++++
 src/Phing/Task/Ext/Hg/HgBaseTask.php                      | 15 +++++++++++++++
 tests/Phing/Test/Io/IniFileParserTest.php                 |  3 +++
 tests/Phing/Test/Listener/MonologListenerTest.php         |  7 +++++++
 tests/Phing/Test/Task/Ext/Analyzer/PHPMDTaskTest.php      |  3 +++
 tests/Phing/Test/Task/Ext/Analyzer/PhpDependTaskTest.php  |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitArchiveTaskTest.php      |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitBaseTest.php             |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitBranchTaskTest.php       |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitCheckoutTaskTest.php     |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitCloneTaskTest.php        |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitDescribeTaskTest.php     |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitFetchTaskTest.php        |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitGcTaskTest.php           |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitInitTaskTest.php         |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitLogTaskTest.php          |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitMergeTaskTest.php        |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitPullTaskTest.php         |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitPushTaskTest.php         |  3 +++
 tests/Phing/Test/Task/Ext/Git/GitTagTaskTest.php          |  3 +++
 tests/Phing/Test/Task/Ext/Hg/HgAddTaskTest.php            |  4 ++++
 tests/Phing/Test/Task/Ext/Hg/HgArchiveTaskTest.php        |  4 ++++
 tests/Phing/Test/Task/Ext/Hg/HgCloneTaskTest.php          |  2 ++
 tests/Phing/Test/Task/Ext/Hg/HgCommitTaskTest.php         |  4 ++++
 tests/Phing/Test/Task/Ext/Hg/HgInitTaskTest.php           |  2 ++
 tests/Phing/Test/Task/Ext/Hg/HgLogTaskTest.php            |  4 ++++
 tests/Phing/Test/Task/Ext/Hg/HgPullTaskTest.php           |  2 ++
 tests/Phing/Test/Task/Ext/Hg/HgPushTaskTest.php           |  2 ++
 tests/Phing/Test/Task/Ext/Hg/HgTagTaskTest.php            |  2 ++
 tests/Phing/Test/Task/Ext/Hg/HgTaskTestSkip.php           |  4 ++++
 tests/Phing/Test/Task/Ext/Hg/HgUpdateTaskTest.php         |  2 ++
 tests/Phing/Test/Task/Ext/Http/HttpGetTaskTest.php        |  3 +++
 tests/Phing/Test/Task/Ext/Http/HttpRequestTaskTest.php    |  3 +++
 tests/Phing/Test/Task/Ext/Smarty/SmartyTaskTest.php       |  3 +++
 .../Phing/Test/Task/Ext/Visualizer/VisualizerTaskTest.php |  3 +++
 tests/Phing/Test/Task/Optional/PDODelimitersTest.php      |  4 ++++
 tests/Phing/Test/Task/Optional/PDOTaskTest.php            |  4 ++++
 37 files changed, 132 insertions(+)

diff --git a/src/Phing/Listener/MonologListener.php b/src/Phing/Listener/MonologListener.php
index 5270608..46c26b0 100644
--- a/src/Phing/Listener/MonologListener.php
+++ b/src/Phing/Listener/MonologListener.php
@@ -23,6 +23,7 @@ namespace Phing\Listener;
 use Monolog\Logger;
 use Phing\Project;
 use Phing\Target;
+use Phing\Exception\BuildException;
 
 /**
  * Listener which sends events to Monolog.
@@ -46,6 +47,12 @@ class MonologListener implements BuildListener
      */
     public function __construct()
     {
+        if (!class_exists(Logger::class)) {
+            throw new BuildException(
+                "The Monolog tasks depend on the monolog/monolog package being installed."
+            );
+        }
+
         $this->log = new Logger(self::LOG_PHING);
     }
 
diff --git a/src/Phing/Task/Ext/Hg/HgBaseTask.php b/src/Phing/Task/Ext/Hg/HgBaseTask.php
index a847abf..af9c66e 100644
--- a/src/Phing/Task/Ext/Hg/HgBaseTask.php
+++ b/src/Phing/Task/Ext/Hg/HgBaseTask.php
@@ -59,6 +59,21 @@ abstract class HgBaseTask extends Task
     protected $user = '';
 
     public static $factory = null;
+
+    /**
+     * Initialize Task.
+     * Check and include necessary libraries.
+     */
+    public function init()
+    {
+        if (!class_exists(Factory::class)) {
+            throw new BuildException(
+                "The Hg tasks depend on the siad007/versioncontrol_hg package being installed.",
+                $this->getLocation()
+            );
+        }
+    }
+
     /**
      * Set repository attribute
      *
diff --git a/tests/Phing/Test/Io/IniFileParserTest.php b/tests/Phing/Test/Io/IniFileParserTest.php
index d9e5bb0..9aeec44 100644
--- a/tests/Phing/Test/Io/IniFileParserTest.php
+++ b/tests/Phing/Test/Io/IniFileParserTest.php
@@ -38,6 +38,9 @@ class IniFileParserTest extends TestCase
 
     protected function setUp(): void
     {
+        if (! class_exists(vfsStream::class)) {
+            $this->markTestSkipped('This test depends on the mikey179/vfsstream package being installed.');
+        }
         $this->parser = new IniFileParser();
         $this->root = vfsStream::setUp();
     }
diff --git a/tests/Phing/Test/Listener/MonologListenerTest.php b/tests/Phing/Test/Listener/MonologListenerTest.php
index 1033fd8..754607c 100644
--- a/tests/Phing/Test/Listener/MonologListenerTest.php
+++ b/tests/Phing/Test/Listener/MonologListenerTest.php
@@ -30,6 +30,13 @@ use PHPUnit\Framework\TestCase;
  */
 class MonologListenerTest extends TestCase
 {
+    public function setUp(): void
+    {
+        if (! class_exists('\Monolog\Logger')) {
+            $this->markTestSkipped('The Monolog tasks depend on the monolog/monolog package being installed.');
+        }
+    }
+
     /**
      * @test
      */
diff --git a/tests/Phing/Test/Task/Ext/Analyzer/PHPMDTaskTest.php b/tests/Phing/Test/Task/Ext/Analyzer/PHPMDTaskTest.php
index 3686961..098a418 100644
--- a/tests/Phing/Test/Task/Ext/Analyzer/PHPMDTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Analyzer/PHPMDTaskTest.php
@@ -31,6 +31,9 @@ class PHPMDTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (!class_exists('\PHPMD\PHPMD')) {
+            $this->markTestSkipped('The PHPMD tasks depend on the phpmd/phpmd package being installed.');
+        }
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/phpmd/build.xml');
     }
 
diff --git a/tests/Phing/Test/Task/Ext/Analyzer/PhpDependTaskTest.php b/tests/Phing/Test/Task/Ext/Analyzer/PhpDependTaskTest.php
index 06a37ed..d088b3e 100644
--- a/tests/Phing/Test/Task/Ext/Analyzer/PhpDependTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Analyzer/PhpDependTaskTest.php
@@ -34,6 +34,9 @@ class PhpDependTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (!class_exists('\PDepend\TextUI\Runner')) {
+            $this->markTestSkipped('The PDepend tasks depend on the pdepend/pdepend package being installed.');
+        }
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/pdepend/build.xml');
     }
 
diff --git a/tests/Phing/Test/Task/Ext/Git/GitArchiveTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitArchiveTaskTest.php
index 8ae7b7b..256c402 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitArchiveTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitArchiveTaskTest.php
@@ -33,6 +33,9 @@ class GitArchiveTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         // set temp directory used by test cases
         mkdir(PHING_TEST_BASE . '/tmp/git');
 
diff --git a/tests/Phing/Test/Task/Ext/Git/GitBaseTest.php b/tests/Phing/Test/Task/Ext/Git/GitBaseTest.php
index 57614c2..90dcb4e 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitBaseTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitBaseTest.php
@@ -35,6 +35,9 @@ class GitBaseTest extends BuildFileTest
 
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         $this->configureProject(
             PHING_TEST_BASE
             . '/etc/tasks/ext/git/GitBaseTest.xml'
diff --git a/tests/Phing/Test/Task/Ext/Git/GitBranchTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitBranchTaskTest.php
index 259e47e..d023ced 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitBranchTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitBranchTaskTest.php
@@ -32,6 +32,9 @@ class GitBranchTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitCheckoutTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitCheckoutTaskTest.php
index 29061f8..08e996b 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitCheckoutTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitCheckoutTaskTest.php
@@ -32,6 +32,9 @@ class GitCheckoutTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitCloneTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitCloneTaskTest.php
index 0dad366..879b4c8 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitCloneTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitCloneTaskTest.php
@@ -32,6 +32,9 @@ class GitCloneTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         // set temp directory used by test cases
         mkdir(PHING_TEST_BASE . '/tmp/git');
 
diff --git a/tests/Phing/Test/Task/Ext/Git/GitDescribeTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitDescribeTaskTest.php
index 7039a9c..b9f9d2d 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitDescribeTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitDescribeTaskTest.php
@@ -31,6 +31,9 @@ class GitDescribeTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitFetchTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitFetchTaskTest.php
index e81235c..a2f9725 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitFetchTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitFetchTaskTest.php
@@ -31,6 +31,9 @@ class GitFetchTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitGcTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitGcTaskTest.php
index 6b58a38..07ca6c3 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitGcTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitGcTaskTest.php
@@ -32,6 +32,9 @@ class GitGcTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitInitTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitInitTaskTest.php
index a89e390..7727734 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitInitTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitInitTaskTest.php
@@ -32,6 +32,9 @@ class GitInitTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         // set temp directory used by test cases
         mkdir(PHING_TEST_BASE . '/tmp/git');
 
diff --git a/tests/Phing/Test/Task/Ext/Git/GitLogTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitLogTaskTest.php
index 83f40b5..888ddae 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitLogTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitLogTaskTest.php
@@ -101,6 +101,9 @@ class GitLogTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitMergeTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitMergeTaskTest.php
index a11e59f..ac2d11c 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitMergeTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitMergeTaskTest.php
@@ -32,6 +32,9 @@ class GitMergeTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitPullTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitPullTaskTest.php
index d4e46f7..311f519 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitPullTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitPullTaskTest.php
@@ -32,6 +32,9 @@ class GitPullTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitPushTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitPushTaskTest.php
index bed7fe5..63ddb75 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitPushTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitPushTaskTest.php
@@ -32,6 +32,9 @@ class GitPushTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Git/GitTagTaskTest.php b/tests/Phing/Test/Task/Ext/Git/GitTagTaskTest.php
index c65d19b..2bb9742 100644
--- a/tests/Phing/Test/Task/Ext/Git/GitTagTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Git/GitTagTaskTest.php
@@ -32,6 +32,9 @@ class GitTagTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! class_exists('VersionControl_Git')) {
+            $this->markTestSkipped('The Git tasks depend on the pear/versioncontrol_git package being installed.');
+        }
         if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
             // make sure we purge previously created directory
             // if left-overs from previous run are found
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgAddTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgAddTaskTest.php
index b7d64a1..706b53d 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgAddTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgAddTaskTest.php
@@ -25,8 +25,12 @@ use Phing\Test\Support\BuildFileTest;
  */
 class HgAddTaskTest extends BuildFileTest
 {
+    use HgTaskTestSkip;
+
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgArchiveTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgArchiveTaskTest.php
index 02c2785..a462382 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgArchiveTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgArchiveTaskTest.php
@@ -25,8 +25,12 @@ use Phing\Test\Support\BuildFileTest;
  */
 class HgArchiveTaskTest extends BuildFileTest
 {
+    use HgTaskTestSkip;
+
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgCloneTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgCloneTaskTest.php
index 3e41811..eaf2291 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgCloneTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgCloneTaskTest.php
@@ -29,6 +29,8 @@ class HgCloneTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         $this->configureProject(
             PHING_TEST_BASE
             . '/etc/tasks/ext/hg/HgCloneTaskTest.xml'
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgCommitTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgCommitTaskTest.php
index 7a3f076..cd7a02b 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgCommitTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgCommitTaskTest.php
@@ -25,8 +25,12 @@ use Phing\Test\Support\BuildFileTest;
  */
 class HgCommitTaskTest extends BuildFileTest
 {
+    use HgTaskTestSkip;
+
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgInitTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgInitTaskTest.php
index 5d13c50..a6e56c7 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgInitTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgInitTaskTest.php
@@ -29,6 +29,8 @@ class HgInitTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgLogTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgLogTaskTest.php
index 35e6353..d4c14aa 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgLogTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgLogTaskTest.php
@@ -25,8 +25,12 @@ use Phing\Test\Support\BuildFileTest;
  */
 class HgLogTaskTest extends BuildFileTest
 {
+    use HgTaskTestSkip;
+
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgPullTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgPullTaskTest.php
index 179697f..0f7b8ff 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgPullTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgPullTaskTest.php
@@ -29,6 +29,8 @@ class HgPullTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgPushTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgPushTaskTest.php
index d6dc56c..3979b22 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgPushTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgPushTaskTest.php
@@ -29,6 +29,8 @@ class HgPushTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgTagTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgTagTaskTest.php
index ac9f93a..83f3e4b 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgTagTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgTagTaskTest.php
@@ -29,6 +29,8 @@ class HgTagTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgTaskTestSkip.php b/tests/Phing/Test/Task/Ext/Hg/HgTaskTestSkip.php
index cae7164..f85cda8 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgTaskTestSkip.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgTaskTestSkip.php
@@ -26,6 +26,10 @@ trait HgTaskTestSkip
 {
     public function markTestAsSkippedWhenHgNotInstalled(): void
     {
+        if (! class_exists('\Siad007\VersionControl\HG\Factory')) {
+            $this->markTestSkipped('The Git tasks depend on the siad007/versioncontrol_hg package being installed.');
+        }
+
         exec('hg help > /dev/null 2>&1', $output, $code);
         if (0 != $code) {
             $this->markTestSkipped('This test require hg to be installed');
diff --git a/tests/Phing/Test/Task/Ext/Hg/HgUpdateTaskTest.php b/tests/Phing/Test/Task/Ext/Hg/HgUpdateTaskTest.php
index 7e567d2..2dceefd 100644
--- a/tests/Phing/Test/Task/Ext/Hg/HgUpdateTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Hg/HgUpdateTaskTest.php
@@ -29,6 +29,8 @@ class HgUpdateTaskTest extends BuildFileTest
 
     public function setUp(): void
     {
+        $this->markTestAsSkippedWhenHgNotInstalled();
+
         mkdir(PHING_TEST_BASE . '/tmp/hgtest');
         $this->configureProject(
             PHING_TEST_BASE
diff --git a/tests/Phing/Test/Task/Ext/Http/HttpGetTaskTest.php b/tests/Phing/Test/Task/Ext/Http/HttpGetTaskTest.php
index 1fb1e85..a815269 100644
--- a/tests/Phing/Test/Task/Ext/Http/HttpGetTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Http/HttpGetTaskTest.php
@@ -33,6 +33,9 @@ class HttpGetTaskTest extends BaseHttpTaskTest
 {
     public function setUp(): void
     {
+        if (!class_exists('\GuzzleHttp\Client')) {
+            $this->markTestSkipped('The Http tasks depend on the guzzlehttp/guzzle package being installed.');
+        }
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/http/httpget.xml');
     }
 
diff --git a/tests/Phing/Test/Task/Ext/Http/HttpRequestTaskTest.php b/tests/Phing/Test/Task/Ext/Http/HttpRequestTaskTest.php
index b839ba9..c82efe2 100644
--- a/tests/Phing/Test/Task/Ext/Http/HttpRequestTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Http/HttpRequestTaskTest.php
@@ -32,6 +32,9 @@ class HttpRequestTaskTest extends BaseHttpTaskTest
 {
     public function setUp(): void
     {
+        if (!class_exists('\GuzzleHttp\Client')) {
+            $this->markTestSkipped('The Http tasks depend on the guzzlehttp/guzzle package being installed.');
+        }
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/http/httprequest.xml');
     }
 
diff --git a/tests/Phing/Test/Task/Ext/Smarty/SmartyTaskTest.php b/tests/Phing/Test/Task/Ext/Smarty/SmartyTaskTest.php
index be6f321..d1df590 100644
--- a/tests/Phing/Test/Task/Ext/Smarty/SmartyTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Smarty/SmartyTaskTest.php
@@ -26,6 +26,9 @@ class SmartyTaskTest extends BuildFileTest
 {
     protected function setUp(): void
     {
+        if (!class_exists('\Smarty\Smarty')) {
+            $this->markTestSkipped('The Smarty tasks depend on the smarty/smarty package being installed.');
+        }
         $buildXmlFile = PHING_TEST_BASE . '/etc/tasks/ext/smarty/SmartyTaskTest.xml';
         $this->configureProject($buildXmlFile);
         $this->executeTarget('setup');
diff --git a/tests/Phing/Test/Task/Ext/Visualizer/VisualizerTaskTest.php b/tests/Phing/Test/Task/Ext/Visualizer/VisualizerTaskTest.php
index 8900604..f716197 100644
--- a/tests/Phing/Test/Task/Ext/Visualizer/VisualizerTaskTest.php
+++ b/tests/Phing/Test/Task/Ext/Visualizer/VisualizerTaskTest.php
@@ -32,6 +32,9 @@ class VisualizerTaskTest extends BuildFileTest
      */
     public function setUp(): void
     {
+        if (!class_exists('\GuzzleHttp\Client')) {
+            $this->markTestSkipped('The Visualizer tasks depend on the guzzlehttp/guzzle package being installed.');
+        }
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/visualizer/VisualizerTaskTest.xml');
     }
 
diff --git a/tests/Phing/Test/Task/Optional/PDODelimitersTest.php b/tests/Phing/Test/Task/Optional/PDODelimitersTest.php
index 7d7d576..54afdab 100644
--- a/tests/Phing/Test/Task/Optional/PDODelimitersTest.php
+++ b/tests/Phing/Test/Task/Optional/PDODelimitersTest.php
@@ -41,6 +41,10 @@ class PDODelimitersTest extends BuildFileTest
      */
     public function setUp(): void
     {
+        if (! extension_loaded('pdo_sqlite')) {
+            $this->markTestSkipped('The PHP pdo sqlite (pdo_sqlite) is needed for this test.');
+        }
+
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/pdo/empty.xml');
         $this->queries = [];
 
diff --git a/tests/Phing/Test/Task/Optional/PDOTaskTest.php b/tests/Phing/Test/Task/Optional/PDOTaskTest.php
index d5fa2fc..0c93695 100644
--- a/tests/Phing/Test/Task/Optional/PDOTaskTest.php
+++ b/tests/Phing/Test/Task/Optional/PDOTaskTest.php
@@ -26,6 +26,10 @@ class PDOTaskTest extends BuildFileTest
 {
     public function setUp(): void
     {
+        if (! extension_loaded('pdo_sqlite')) {
+            $this->markTestSkipped('The PHP pdo sqlite (pdo_sqlite) is needed for this test.');
+        }
+
         $this->configureProject(PHING_TEST_BASE . '/etc/tasks/ext/pdo/test.xml');
     }