#393 closed defect (fixed)
PHP bindings test fail for checking valid geometry
Reported by: | arsgeografica | Owned by: | csavage |
---|---|---|---|
Priority: | trivial | Milestone: | 3.3.0 |
Component: | SWIG | Version: | main |
Severity: | Annoyance | Keywords: | php phpunit |
Cc: |
Description
When compiling and testing the PHP bindings as laid out in http://crischan.net/blog/10/ the test runs, but fails with
1) test::testGeometry_checkValidity Undefined index: reason
when asserting that the "reason" key of the checkValidity result is null when used on a _valid_ geometry (lines 1267-1272).
Looking at php/geos.c lines 1182/1183 this seems right: the reason and location attributes are only created in the result array if the checked geometry is not valid. This test on a non-valid geometry (test.php 1274-1280) behaves as expected.
This seems sane behavior, but then the test.php should be adapted.
Attachments (1)
Change History (7)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | geos_php_test.patch added |
---|
comment:3 by , 13 years ago
Also, would you suggest a switch to enable that level of debugging when runnign the test ? See Makefile.am:
PHPOPTS = -n -d enable_dl=On -d extension_dir=$(abs_topbuilddir)/php/.libs
Some additional -d switch to raise debugging level would be nice
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
All tests pass after applying the patch, thanks for that and sorry for not providing this myself. I am not sure about your last comment, do you want input from me on raising the debug level?
Forgot to mention: This was tested using PHP 5.3.2 on Ubuntu 10.04 and 10.10.