kissifrot / php-ixr

This is a fork of the original Incutio PHP XML-RPC library (IXR) SVN repo hosted on Google Code
http://scripts.incutio.com/xmlrpc/
Other
5 stars 6 forks source link

Adding tests and porting over a few fixes from DokuWiki #5

Closed splitbrain closed 2 years ago

splitbrain commented 3 years ago

We want to replace our own copy of the IXR library with a composer dependency to your release. While working on it I came across a few smaller things we had fixed over the years that are not in your library, yet.

This pull request,

Because all of these somewhat depend on each other I submit them as one pull request instead of multiple.

If you're interested, I could also contribute:

tenzap commented 2 years ago

Hi all & @kissifrot , any news on this please? We are trying to get this into a Debian package and having the tests would be really nice.

tenzap commented 2 years ago

Hi, thanks for merging. However, the tests do actually fail. Any idea @kissifrot , @splitbrain ?

There were 2 failures:

1) IXR\tests\Message\ixr_library_ixr_message_test::testStringValue
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => 'change'
+    0 => ' change  '
 )

/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/Message/MessageTest.php:50

2) IXR\tests\Message\ixr_library_ixr_message_test::testStruct
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => 'start'
-    1 => 'test text'
+    1 => 'test text   '
     2 => Array (...)
 )

/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/Message/MessageTest.php:107

ERRORS!
Tests: 17, Assertions: 16, Errors: 9, Failures: 2.

EDIT: Forget it, it's a packaging error. I sorted it out. Sorry.

tenzap commented 2 years ago

I also have 9 errors:

There were 9 errors:

1) IXR\tests\DataType\DateTest::testParseIso with data set #0 ('2010-08-17T09:23:14', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

2) IXR\tests\DataType\DateTest::testParseIso with data set #2 ('2010-08-17 09:23:14', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

3) IXR\tests\DataType\DateTest::testParseIso with data set #3 ('20100817 09:23:14', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

4) IXR\tests\DataType\DateTest::testParseIso with data set #6 ('2010-08-17 09:23:14+0000', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

5) IXR\tests\DataType\DateTest::testParseIso with data set #7 ('2010-08-17 09:23:14+00:00', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

6) IXR\tests\DataType\DateTest::testParseIso with data set #8 ('2010-08-17 12:23:14+03:00', 1282036994)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

7) IXR\tests\DataType\DateTest::testParseIso with data set #9 ('2010-08-17T09:23', 1282036980)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

8) IXR\tests\DataType\DateTest::testParseIso with data set #10 ('20100817T09:23', 1282036980)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

9) IXR\tests\DataType\DateTest::testParseIso with data set #11 ('2010-08-17', 1282003200)
Error: Call to a member function format() on bool

/usr/share/php/IXR/DataType/Date.php:69
/mnt/packages/git_repos/dpkg/php-kissifrot-php-ixr/tests/DataType/DateTest.php:50

EDIT: Forget it, it's a packaging error. I sorted it out. Sorry.

tenzap commented 2 years ago

Forget it, it's a packaging error. I sorted it out. Sorry.