Skip to content

Instantly share code, notes, and snippets.

@legovaer
legovaer / sauce.yml
Created April 29, 2014 11:09
Behat YML file for SauceLabs (not working)
sauce:
filters:
tags: "@multibrowsers"
extensions:
Behat\MinkExtension\Extension:
javascript_session: 'selenium2'
base_url: http://www.legovaer.be
selenium2:
browser: firefox
wd_host: <username>:<apikey>@ondemand.saucelabs.com/wd/hub
@legovaer
legovaer / gist:144eb115f7f0dc7a9a42
Created February 5, 2015 12:23
Drupal 8 Logger example
\Drupal::logger('locale')->error('Import of string "%string" was skipped because of disallowed or malformed HTML.', array('%string' => $translation));
@legovaer
legovaer / scenarios.sh
Created April 8, 2015 14:31
Behat Scenario overview
#!/bin/bash
# Bash script that will give you a overview of all Scenario's inside your
# features folder. By default, the folder "features/" will be analyzed.
# If your feature files are located somewhere else, just pass the folder as an argument.
green='\e[30;48;5;82m'
gold='\e[38;5;208m'
NC='\033[0m'
FOLDER="features/"
if [ ! -z "$1" ]; then
@legovaer
legovaer / gist:095748f6efee34ecc7c5
Created April 14, 2015 12:48
Behat Code Coverage report
<?php
require_once('vendor/autoload.php');
$file = 'config/behat.yml';
$coverage_out = '/www/behat/reports/coverage';
use Symfony\Component\DependencyInjection\ContainerBuilder,
Symfony\Component\Console\Input\ArrayInput,
Symfony\Component\Console\Output\NullOutput;
@legovaer
legovaer / git-tags.sh
Created August 13, 2015 08:43
Display the list of tags of the current GIT repositoy with their dates
#!/bin/sh
# Display the list of tags of the current GIT repositoy with their dates
# Author: (www.)legovaer(.be)
GREEN='\033[0;32m'
NC='\033[0m'
git tag -l | sed 1d | \
while read i
do
DATE="$(git log -1 --format=%ai $i)"
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f263344..120eb45 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,4 +1,4 @@
-$Id$
+$Id: CHANGELOG.txt,v 1.6.2.45 2010/03/11 12:39:54 wwalc Exp $
-----------------------------
2010-03-11
<?php
$vals = array("false", "FALSE", FALSE, NULL, array());
echo 'array("false", "FALSE", FALSE, NULL, array())' . "\n\n";
foreach ($vals as $key => $val) {
if ($val = FALSE) {
echo "key $key is FALSE\n";
}
else {
@legovaer
legovaer / .bash_profile
Created November 12, 2015 15:50
git-blame-function
# This needs to be added to your .bash_profile
##
# GIT Helpers
##
# Usage: git-blame <file>
git-blame() {
ruby ~/scripts/git-blame-colored $1 | less -R
}
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index a541a18..fc6930c 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -1,4 +1,9 @@
<?php
+
+$path = "/usr/local/simpletest/extensions/coverage";
+set_include_path(get_include_path() . PATH_SEPARATOR . $path);
+require "autocoverage.php";
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 30b3aab..5fe0ea5 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -4,6 +4,10 @@
* This script runs Drupal tests from command line.
*/
+$path = __DIR__ . "/../vendor/phpunit/phpcov/src/lib";
+set_include_path(get_include_path() . PATH_SEPARATOR . $path);