eileenmcnaughton / org.wikimedia.geocoder

Geocoder for CiviCRM
Other
6 stars 17 forks source link

How can I run tests? #22

Closed MegaphoneJon closed 3 years ago

MegaphoneJon commented 3 years ago

I've encountered a bug - geocoder writes lat/lon to the database without regard for the number of characters in the value - but the Civi UI limits float fields to 14 characters. So if this extension writes a geocode with >14 characters, it causes a validation error.

However, I can't seem to find the right command to run the tests. Here's what I've been trying (from the webroot):

env CIVICRM_UF=UnitTests idekey=VSCODE phpunit6 /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/org.wikimedia.geocoder/tests/phpunit/GeocoderTest.php --configuration /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/org.wikimedia.geocoder/phpunit.xml.dist

This returns:

  [RuntimeException]                         
  Cannot resolve path using "cms.root.path"  

If I can run tests I can add a test for this issue.

MegaphoneJon commented 3 years ago

I've decided the bug isn't in Geocoder for passing these values, but core for allowing them. I'll resolve it there.