libsmbclient-php icon indicating copy to clipboard operation
libsmbclient-php copied to clipboard

PHPUnit compatibility

Open remicollet opened this issue 4 years ago • 4 comments

Managing PHPUnit compatibility is a real nightmare

Most often, PHP extensions use .phpt file instead of phpunit test case

For now, we are unable to run test suite with PHP 8 because of phpunit

This ticket is for discussion.

What should we do for tests ?

remicollet avatar Mar 01 '21 16:03 remicollet

So, you mean that even https://travis-ci.org/github/eduardok/libsmbclient-php/builds/761208019 is ugly enough ? Check out my changes at https://github.com/eduardok/libsmbclient-php/tree/phpunit (won't merge like that, might squash). I mean, it is ugly, but at least buys us time.

eduardok avatar Mar 02 '21 05:03 eduardok

I'm trying to understand that actual failure there... 20 vs 2. Is ENOTDIR now returning 2, or is it some other issue? Haven't traced it yet...

eduardok avatar Mar 03 '21 00:03 eduardok

@remicollet if you have any comments on ENOTDIR returning 2 on PHP 8, please let me know. If it is the expected behaviour than I can probably add those changes to the master branch, and have the library tested on PHP 8 going forward.

eduardok avatar Mar 16 '21 02:03 eduardok

Used to try run tests for Alpinelinux and got new failure with PHP 8.1

1) StateInitTest::testStateInitInvalidState
TypeError: smbclient_state_init(): Argument #1 ($state) must be of type resource, null given

Not clear how to setup smb-server to test connection test

andypost avatar Aug 06 '22 13:08 andypost