##1. Setup docker
#Mac
https://docs.docker.com/installation/mac/
#Linux
https://docs.docker.com/installation/ubuntulinux/
##2. Setup docker-machine
##1. Setup docker
#Mac
https://docs.docker.com/installation/mac/
#Linux
https://docs.docker.com/installation/ubuntulinux/
##2. Setup docker-machine
##Open .inputrc
sudo vim ~/.inputrc
##Paste the following
"\e[A": history-search-backward
"\e[B": history-search-forward
<?php | |
namespace FrontendBundle\Features\Context; | |
use Behat\Behat\Hook\Scope\AfterScenarioScope; | |
use Behat\Gherkin\Node\TableNode; | |
use Behat\Symfony2Extension\Context\KernelAwareContext; | |
use Behat\Symfony2Extension\Context\KernelDictionary; | |
use Faker\Factory as FakerFactory; |
#!/bin/sh | |
BASE=$(git rev-parse --show-toplevel) | |
php-cs-fixer self-update | |
php-cs-fixer fix $BASE/src/ --level=symfony |
$query = $this->em->getConnection()->createQueryBuilder() | |
->select('a.*') | |
->from('asset', 'a'); | |
if ($type) { | |
$query->andWhere('a.type = :type') | |
->setParameter('type', $type); | |
} | |
$assets = $query->execute()->fetchAll(); |
1. Create cleanup.sh somewhere with the following code: | |
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d | |
2. Create global alias for that file: | |
git config --global alias.cleanup '!sh <location of your file>/cleanup.sh' | |
3. Checkout to your develop or master and run: |
<?php | |
namespace FrontendBundle\Features\Context; | |
use Behat\Behat\Hook\Scope\BeforeScenarioScope; | |
use Behat\Mink\Exception\ElementNotFoundException; | |
use Behat\Mink\Exception\ElementTextException; | |
use Behat\Mink\Exception\ResponseTextException; | |
use Behat\MinkExtension\Context\RawMinkContext; | |
class TimeoutContext extends RawMinkContext |