Skip to content

ethosce/DrupalDriver

This branch is 243 commits behind jhedstrom/DrupalDriver:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 8, 2016
Mar 25, 2015
Sep 29, 2016
Apr 8, 2016
Oct 23, 2015
Apr 8, 2016
Oct 15, 2014
Oct 30, 2014
Dec 7, 2015
Jun 15, 2015
Oct 17, 2014

Repository files navigation

Build Status

Provides a collection of light-weight drivers with a common interface for interacting with Drupal. These are generally intended for testing, and are not meant to be API-complete.

Read the full documentation

Latest Stable Version Total Downloads License Scrutinizer Code Quality

Drivers

These drivers support Drupal versions 7 and 8.

  • Blackbox
  • Direct Drupal API bootstrap
  • Drush

Installation

{
  "require": {
    "drupal/drupal-driver": "~1.0"
  }
}
$> curl -sS http://getcomposer.org/installer | php
$> php composer.phar install

Usage

<?php

use Drupal\Driver\DrupalDriver;
use Drupal\Driver\Cores\Drupal8;

require 'vendor/autoload.php';

// Path to Drupal.
$path = './drupal-8';

// Host.
$uri = 'http://d8.devl';

$driver = new DrupalDriver($path, $uri);
$driver->setCoreFromVersion();

// Bootstrap Drupal.
$driver->bootstrap();

// Create a node.
$node = (object) array(
  'type' => 'article',
  'uid' => 1,
  'title' => $driver->getRandom()->name(),
);
$driver->createNode($node);

About

A collection of drivers for controlling Drupal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%