drupal / drupal-driver
A collection of reusable Drupal drivers
Fund package maintenance!
jhedstrom
Installs: 12 692 504
Dependents: 27
Suggesters: 0
Security: 0
Stars: 64
Watchers: 9
Forks: 95
Open Issues: 66
Requires
- php: >=7.4
- drupal/core-utility: ^8.4 || ^9 || ^10 || ^11
- symfony/dependency-injection: ~2.6 || ~3.0 || ~4.4 || ^6 || ^7.1
- symfony/process: ~2.5 || ~3.0 || ~4.4 || ^6 || ^7.1
Requires (Dev)
- composer/installers: ^2.1
- dms/phpunit-arraysubset-asserts: ^0.4.0 || ^0.5.0
- drupal/coder: ~8.3.0
- drupal/core-composer-scaffold: ^8.4 || ^9 || ^10 || ^11
- drupal/core-recommended: ^8.4 || ^9 || ^10 || ^11
- drupal/mailsystem: ^4.4 || 4.x-dev
- drush-ops/behat-drush-endpoint: *
- mockery/mockery: ^1.5
- palantirnet/drupal-rector: ^0.13
- php-parallel-lint/php-parallel-lint: ^1.0
- phpspec/phpspec: ~2.0 || ~4.0 || ~6.1 || dev-main
- phpunit/phpunit: ~6.0 || ~7.0 || ^9 || ^10
- symfony/phpunit-bridge: ^6.1
Conflicts
- drupal/core: >=8.0 <9.3
- 2.3.x-dev
- dev-master / 2.3.x-dev
- v2.3.0
- 2.2.x-dev
- v2.2.2
- v2.2.1
- v2.2.0
- 2.1.x-dev
- v2.1.2
- v2.1.1
- v2.1.0
- 2.0.x-dev
- v2.0.0
- v2.0.0-rc1
- v2.0.0-alpha6
- v2.0.0-alpha5
- v2.0.0-alpha4
- v2.0.0-alpha3
- v2.0.0-alpha2
- v2.0.0-alpha1
- 1.4.x-dev
- v1.4.0
- 1.3.x-dev
- v1.3.2
- v1.3.1
- v1.3.0
- 1.2.x-dev
- v1.2.2
- v1.2.1
- v1.2.0
- 1.1.x-dev
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- 1.0.x-dev
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0.0-beta2
- v1.0.0-beta
- dev-prep/2.1.1
- dev-186-backend-auth
- dev-188-simplify-testing
- dev-support-php-7
- dev-revert-63-master
- dev-additional-travis-envs
- dev-extension-loading-abstraction
- dev-fix-d8
- dev-php53-fixes
- dev-fix-drupal8-bootstrap
This package is auto-updated.
Last update: 2024-10-21 16:18:07 UTC
README
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.
Drivers
These drivers support Drupal versions 7 and 8.
- Blackbox
- Direct Drupal API bootstrap
- Drush
Installation
{ "require": { "drupal/drupal-driver": "~2.0" } }
$> curl -sS http://getcomposer.org/installer | php $> php composer.phar install
Usage
<?php use Drupal\Driver\DrupalDriver; 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);
Contributing
Features and bug fixes are welcome! First-time contributors can jump in with the issues tagged good first issue.
See CONTRIBUTING.md for more information.
Release notes
See CHANGELOG.