Merge pull request #24 from chillu/pulls/behat

Added 'phing behat' command
This commit is contained in:
Sam Minnée 2012-11-15 18:35:17 -08:00
commit 0f28a3d456
2 changed files with 45 additions and 2 deletions

20
behat.yml Normal file
View File

@ -0,0 +1,20 @@
default:
extensions:
SilverStripe\BehatExtension\Extension:
framework_path: framework
Behat\MinkExtension\Extension:
# Adjust this to your own website URL.
# Uncomment, or set through environment variable:
# > export BEHAT_PARAMS="extensions[Behat\MinkExtension\Extension][base_url]=http://localhost/"
#
# base_url: http://localhost/
# TODO Dynamically set through LocatorProcessor
files_path: %behat.paths.base%/framework/tests/behat/features/files/
default_session: selenium2
javascript_session: selenium2
goutte: ~
selenium2:
browser: firefox

View File

@ -133,6 +133,27 @@ Options:
<exec command="${phpunit_bin}" checkreturn="true" passthru="true" />
</target>
<target name="behat" if="basedir"
description="Runs behaviour tests through Behat, on the 'framework' and 'cms' modules (if available). Requires phpunit, composer and behat.">
<if>
<available file="${basedir}/framework/" type="dir" />
<then>
<echo msg="Testing 'framework' module" />
<exec command="vendor/bin/behat @framework" checkreturn="true" passthru="true" />
</then>
</if>
<if>
<available file="${basedir}/cms/" type="dir" />
<then>
<echo msg="Testing 'cms' module" />
<exec command="vendor/bin/behat @cms" checkreturn="true" passthru="true" />
</then>
</if>
</target>
<target name="tag" if="basedir"
description="Creates a new git tag in all the nested working copies (optionally pushes the created tag)"
depends="_gitRepositories,_gitBinary">
@ -247,7 +268,8 @@ Options:
<exclude name="_ss_environment.php" />
<exclude name="*.tar.gz" />
<exclude name="*.zip" />
<exclude name="behat.yml" />
<exclude name="composer.*" />
</fileset>
<fileset dir="${basedir}">
<include name="assets/Uploads" />
@ -278,7 +300,8 @@ Options:
<exclude name="_ss_environment.php" />
<exclude name="*.tar.gz" />
<exclude name="*.zip" />
<exclude name="behat.yml" />
<exclude name="composer.*" />
<exclude name="cms/**" />
</fileset>
<fileset dir="${basedir}">