FileMaker icon indicating copy to clipboard operation
FileMaker copied to clipboard

Unit tests fail out of the box

Open kupietools opened this issue 3 years ago • 1 comments

FM Server 19.4.2.204 running on MacOS Catalina 10.15.7 on Intel.

Unit test results:

==========================================
 FILEMAKER API UNIT TEST
==========================================

------------------------------------------
 Test FileMaker object's main methods
------------------------------------------
API version : 2.2.4
Min server version : 10.0.0.0

Get databases list...FMServer_Sample...SUCCESS

Get layouts list...
EXCEPTION :
  - At :/Library/FileMaker Server/HTTPServer/htdocs/airmoi-filemaker-master/src/FileMaker.php line 1145
  - Code :802
  - Message :Unable to open file
  - Stack :#0 /Library/FileMaker Server/HTTPServer/htdocs/airmoi-filemaker-master/src/Parser/FMResultSet.php(89): airmoi\FileMaker\FileMaker->returnOrThrowException(NULL, '802')
#1 /Library/FileMaker Server/HTTPServer/htdocs/airmoi-filemaker-master/src/FileMaker.php(636): airmoi\FileMaker\Parser\FMResultSet->parse('listLayouts()
#3 {main}

If I change the error reporting from exception to standard, I get:

==========================================
 FILEMAKER API UNIT TEST
==========================================

------------------------------------------
 Test FileMaker object's main methods
------------------------------------------
API version : 2.2.4
Min server version : 10.0.0.0

Get databases list...FMServer_Sample...SUCCESS

Get layouts list...

Warning:  sizeof(): Parameter must be an array or an object that implements Countable in /Library/FileMaker Server/HTTPServer/htdocs/airmoi-filemaker-master/demo/sample.php on line 34

FAIL !

kupietools avatar Mar 11 '22 02:03 kupietools

Hello,

This sample file requires you to have the filemaker-test.fmp12 file hosted on your local filemaker server. You can find the filemaker-test file in the test folder.

airmoi avatar Mar 31 '22 11:03 airmoi

Pease not this sample test file is deprecated and does not work with PHP >= 8

airmoi avatar Dec 26 '23 16:12 airmoi