[dev] Setting up testing
Michael Schlueter
michael at johalla.de
Mon Nov 25 21:03:00 UTC 2024
Am 25.11.24 um 19:20 schrieb Mike:
>
> I'm just starting to set up testing, using php 8.1.13, I get a pretty
> clean run, it produces:
>
> Tests: 165, Assertions: 254, Errors: 1, Failures: 2, Skipped: 2,
> Incomplete: 2, Risky: 1.
>
> I was started out following this article:
> https://www.ralf-lang.de/2024/01/13/horde-6-return-of-the-git-tree/
>
> But veered off it since the 'horde-components github-clone-org' didn't
> seem to work.
>
> I set up everything by doing the following:
>
> md horde6
> cd horde6
> composer create-project horde/bundle:dev-FRAMEWORK_6_0 .
> composer config minimum-stability dev
> composer update
> cd vendor/horde/components
> composer config minimum-stability dev
> composer install
> cp phpunitl.xml.dist phpunit.xml
> phpunit //version (9.6.17)
>
> I'm going to dig into the errors that came from the phpunit testing
> and it seems sensible for me to stay with 8.1.13 until I resolve the
> issues in front of me, then move to 8.3.14.
>
>
> php 8.3.14 produces:
>
> Tests: 165, Assertions: 254, Errors: 1, Failures: 2, Skipped: 2,
> Incomplete: 2, Risky: 1.
> with a Fatel Error box regarding RecursiveDirectoryIterator.
>
>
> My hope is that if my setup isn't what is being used "normally", then
> I'd hope someone might give me a hint on how I might better put this
> together to be in sync with whatever development is still going on.
>
> Thanks for whatever attention you can give this.
>
> Mike B.
Hi Mike,
I tried to follow your instruction but for me
cd vendor/horde/components
does not work. Looks like horde/components were not installed in my setup.
I usually run the phpunit tests per package with following commands:
git clone https://github.com/horde/Core
cd Core/
composer config minimum-stability dev
composer update
phpunit -v
With the result:
PHPUnit 9.6.20 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.11
Configuration: /horde6/Core/phpunit.xml.dist
Warning - The configuration file did not pass validation!
The following problems have been detected:
Line 9:
- Element 'phpunit', attribute 'cacheDirectory': The attribute
'cacheDirectory' is not allowed.
Test results may not be as expected.
SSS...IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII....................... 65 /
91 ( 71%)
..........III........F.... 91 /
91 (100%)
Time: 00:00.039, Memory: 10.00 MB
There was 1 failure:
1) Horde\Core\Test\UrlTest::testUrl
URI: test.php, full: false, SSL: 0, port: 80, session: 0, cookie: false
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'/hordeurl/test.php?PHPSESSID'
+'/hordeurl/test.php?PHPSESSID='
......
FAILURES!
Tests: 91, Assertions: 125, Failures: 1, Skipped: 3, Incomplete: 39.
Cheers,
Michael
More information about the dev
mailing list