Using PHPUnit

From Littledamien Wiki
Revision as of 04:31, 16 September 2015 by Video8 (talk | contribs)
Jump to navigation Jump to search

Testing URLs

TODO: document Selenium installation, configuration, and basic usage.[1]

Installation/Configuration errors and fixes

mysqli no such file or directory

Run a unit test that makes a database connection and receive

mysqli::mysqli(): (HY000/2002): No such file or directory

First Google results suggested making sure that the mysql extension was compiled into PHP. I don't think this was the actual issue.

I installed PHP using homebrew, according to these instructions. This version of PHP comes with MySQL compiled into it, but I think that PHP that comes installed on the Mac most likely does also.

The issue ended up being that the MySQL connection was configured to use localhost as the host name. locahost for the PHP CLI resolves to something very different than when running on the development web server. [2]

Notes

See also

Footnotes