There is not much documentation and examples of drupal with behat test, so I will start with simplest. I will assume you have installed
There is not much documentation and examples of drupal with behat test, so I will start with simplest. I will assume you have installed
I wrote about this great drupal find http://drupaldump.com/drush-cutie-about-minute-install-full-instance-dr…
but what was not obvious is how to reuse this drupal installation. Once you close terminal window, server closes and it doesn't work. There is a command
I stumbled upon a great find, Drush Cutie. What it does is takes advantage of PHP's built-in web server (PHP >= 5.4) and uses a sqlite database to get a fresh, stand-alone copy of Drupal up and running, all in about a minute.
use Drupal\Core\Controller\ControllerBase;
use Drupal\my_module\SomeClass;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
class SomeController extends ControllerBase
{
private $someProperty;
public function __construct(SomeClass $someProperty)
{
Getting into drupal 8 from drupal 7 is hard. Especially if you are new to OOP, some articles about what is what will help you on that way. I suggest the following in that order
Still new to this drupal 8 beast and trying to learn how to drill down data from entites. There are this magic getters and setters methods that get you data without need to write them. So
I had many vagrant machines and haven't really paid much attention to setting unique hostname, machine name and IP address, which resulted in mixed environments. Meaning I loaded one URL and I got files and database from the other vagrant machine. To debug what was really happening I went into devel/php and found out where is my mind I mean Index file :) to do that I echoed it like this.
UPDATE: This is changed now and author wants that we install drupal launcher and then drupal console per project as stated here so composer global require is no longer supported
You may get this message trying to update drush globally via composer,
"To initialize a project, please create a composer.json file as described in the...."
so lets make it sure both are globally installed and required.
Download phar file with
curl -sS https://getcomposer.org/installer | php
then move it to /usr/local
To see where CLI settings are type
php --ini
It is possible that you will get this: