Avant de se lancer, rien de tel que revoir le partitionnement, car après, c'est un peu plus dur.
$ passwd
<?php | |
class importTask extends sfTask | |
{ | |
protected function execute($arguments = array(), $options = array()) | |
{ | |
$xml = simplexml_load_file('file'); | |
$users = array(); | |
foreach ($xml->users as $user) | |
{ |
require 'rubygems' | |
require 'yaml' | |
# A demonstration of YAML anchors, references and handling of nested values | |
# For more info, see: | |
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
stooges = YAML::load( File.read('stooges.yml') ) | |
# => { | |
# "default" => { |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
If you want to run it on phantomjs (a headless browser) you can add this profile to your behat.yml and you need phantomjs >= 1.8.0
phantomjs:
extensions:
Behat\MinkExtension\Extension:
base_url: http://dev.local
goutte: ~
selenium2:
wd_host: "http://localhost:8643/wd/hub"
<?php | |
use | |
mageekguy\atoum\scripts\treemap, | |
mageekguy\atoum\scripts\treemap\analyzers, | |
mageekguy\atoum\scripts\treemap\categorizer | |
; | |
$testsDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR; |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
default: | |
formatter: | |
name: pretty | |
paths: | |
features: features | |
context: | |
class: Context\FeatureContext | |
extensions: | |
Behat\MinkExtension\Extension: | |
default_session: symfony2 |
<?php | |
namespace MFB\Behat\Subcontext; | |
use Behat\Gherkin\Node\PyStringNode; | |
use Behat\MinkExtension\Context\RawMinkContext; | |
use Symfony\Component\Console\Tester\CommandTester; | |
use Symfony\Component\EventDispatcher\EventDispatcher; | |
/** |