Skip to content

Instantly share code, notes, and snippets.

@dannykopping
Created April 7, 2012 00:10
Show Gist options
  • Select an option

  • Save dannykopping/2324180 to your computer and use it in GitHub Desktop.

Select an option

Save dannykopping/2324180 to your computer and use it in GitHub Desktop.
Phing Behat Task
<?xml version="1.0" encoding="UTF-8"?>
<project name="ci-phing-behat-test" default="dev">
<!-- load variable definitions -->
<property file="build.properties"/>
<property name="behat.basedir" value="${project.basedir}/../test"/>
<!-- define custom tasks and types -->
<typedef name="args" classname="phing.behat.types.BehatArguments"/>
<taskdef name="behat" classname="phing.behat.tasks.BehatTask"/>
<!-- create timestamp -->
<tstamp>
<format property="build.time" pattern="%Y-%m-%d %H:%I:%S"/>
</tstamp>
<echo msg="PHING build on ${project.name} at ${build.time} on ${host.name}"/>
<target name="dev" description="Builds and deploys a development build">
<behat featuresDir="${behat.basedir}/features" features="echo"
executable="${behat.basedir}/bin/behat"
config="${behat.basedir}/behat.yml"
htmlOutput="${project.basedir}/behat.html">
<!-- specify arbitrary arguments like this: -->
<!--<arguments>
<argument cmd="-arbitrary"/>
</arguments>-->
</behat>
</target>
</project>
@sobi3ch
Copy link

sobi3ch commented Dec 27, 2014

Nice, so where I can find behat phing task to download??

@typhonius
Copy link

I found this gist after looking for a BehatTask myself. I ended up writing a basic one here: https://gist.github.com/typhonius/c183b31c3f30be0cddf0

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