Problem/Motivation
phpunit command fails on MAMP.
Proposed resolution
According to comment #1, there is a workaround in place:
Comment out the following lines in /Applications/MAMP/Library/bin/envvars
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH
Remaining tasks
Determine if fix is necessary.
Original report by msonnabaum
The error is this:
Warning: file_get_contents(~/sites/default/files/simpletest/phpunit-2.xml) [function.file-get-contents]: failed to open stream: No such file or directory in simpletest_phpunit_xml_to_rows() (line 733 of core/modules/simpletest/simpletest.module).
Exception: String could not be parsed as XML in SimpleXMLElement->__construct() (line 734 of ~/core/modules/simpletest/simpletest.module).
The issue is just that the phpunit command is failing.
I spent some time debugging it, and it looks like a MAMP bug, described in this issue: http://stackoverflow.com/questions/7163497/resolved-mamp-php-cant-exec-c...
If I change the exec line to this, it passes for me with MAMP:
$ret = exec('export DYLD_LIBRARY_PATH="/usr/lib";' . join($command, " "));
I guess we could put a conditional in for MAMP and do that, but it doesn't feel great to me.
Comments
Comment #1
agentrickardSo MAMP users can account for this now by editing
/Applications/MAMP/Library/bin/envvarsand commenting out the following lines.That will get people up and running until we determine if we want to fix this.
Comment #2
geerlingguy commentedEnough people use MAMP that it might be worth it. Otherwise, have some really easy to find documentation. This bug took at least an hour of troubleshooting over IRC to understand where it was coming from.
Comment #3
geerlingguy commentedThe solution in #1 above works for me.
Comment #4
eclipsegc commentedWorking for me with this fix too.
Comment #5
dcam commentedhttp://drupal.org/node/1427826 contains instructions for updating the issue summary with the summary template.
The summary may need to be updated with information from comments.
Comment #6
thanhtek commentedIssue Summary Template has been added.
Comment #7
mile23I added MAMP's PHP binary to my path in ~/.profile:
export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:[more path stuff here]
This means you can't use MAMP to change PHP versions, but if you really need to do that you can just alter your path settings.
Comment #8
catchDowngrading since this looks like a MAMP bug and there's already a workaround in the issue summary.
Comment #8.0
catchIssue Summary Template
Comment #9
jhedstromAnything left to do here, or can this be closed out?
Comment #10
agentrickardIt can be closed. Documenting would be nice.
Comment #13
mile23Updated the MAMP docs with instructions: https://www.drupal.org/docs/develop/local-server-setup/mac-os-developmen...