PHPUnit and Facebook’s php-webdriver

This seems straight forward at first, but there is either an autoloading issue in my project, or the author of the blog assumed everyone would know about PHP “namespaces” and how to “use” (aka “import” in Java) the external classes.

Namespace tutorial: http://daylerees.com/php-namespaces-explained/

Once namespace imports were working, there was another error:

Call to undefined function Facebook\WebDriver\Remote\curl_init()

This was fixed by installing curl into PHP: sudo apt-get install php5-curl. Check it installed properly: php -info | grep -i curl

/etc/php5/cli/conf.d/20-curl.ini,
curl
cURL support => enabled
cURL Information => 7.38.0

About the Author

Sean

View Posts →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.