Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configurations to run Drupal Commerce tests in PHPStorm. add to $PROJECT/.idea/runConfigurations. The compound "Commerce Test Runner" will launch PhanomJS, PHP's built in and then run Drupal Commerce's PHPUnit tests.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Built-in" type="PhpBuiltInWebServerConfigurationType" factoryName="PHP Built-in Web Server" singleton="true" document_root="$PROJECT_DIR$/www" port="8080">
<method />
</configuration>
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Commerce PHPUnit" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
<TestRunner configuration_file="$PROJECT_DIR$/www/core/phpunit.xml" directory="$PROJECT_DIR$/www/modules/commerce" use_alternative_configuration_file="true" />
<method />
</configuration>
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Commerce Test Runner" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="BashConfigurationType" name="PhantomJS" />
<toRun type="PhpBuiltInWebServerConfigurationType" name="Built-in" />
<toRun type="PHPUnitRunConfigurationType" name="Commerce PHPUnit" />
<method />
</configuration>
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PhantomJS" type="BashConfigurationType" factoryName="Bash" singleton="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/www" />
<option name="PARENT_ENVS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/www/run-phantomjs.sh" />
<option name="PARAMETERS" value="" />
<module name="" />
<envs />
<method />
</configuration>
</component>
<!-- Snippet of environment settings. -->
<php>
<!-- Set error reporting to E_ALL. -->
<ini name="error_reporting" value="32767"/>
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
<env name="SIMPLETEST_BASE_URL" value="http://localhost:8080"/>
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/.ht.sqlite"/>
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
<!--<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/platform/www/sites/simpletest/browser_output"/>-->
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/Users/mglaman/Drupal/sites/commerce2x/www/sites/simpletest/browser_output"/>
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
</php>
#!/usr/bin/env bash
phantomjs --ssl-protocol=any --ignore-ssl-errors=true ./vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768
@jibran

This comment has been minimized.

Show comment
Hide comment
@jibran

jibran May 28, 2016

I was wondering how can we make simpletest runner in PHPStorm? I'd love to hear about it from you.

jibran commented May 28, 2016

I was wondering how can we make simpletest runner in PHPStorm? I'd love to hear about it from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment