AI prompts
base on A collection of drivers for controlling Drupal. <?php
/**
* @file
*/
?>
[](https://github.com/jhedstrom/DrupalDriver/actions/workflows/ci.yml)
Provides a collection of light-weight drivers with a common interface for interacting with [Drupal](http://drupal.org). These are generally intended for testing, and are not meant to be API-complete.
[Read the full documentation](http://drupal-drivers.readthedocs.org)
[](https://packagist.org/packages/drupal/drupal-driver) [](https://packagist.org/packages/drupal/drupal-driver) [](https://packagist.org/packages/drupal/drupal-driver) [](https://scrutinizer-ci.com/g/jhedstrom/DrupalDriver/?branch=master)
### Drivers
These drivers support Drupal versions 7 and 8.
* Blackbox
* Direct Drupal API bootstrap
* Drush
### Installation
``` json
{
"require": {
"drupal/drupal-driver": "~2.0"
}
}
```
``` bash
$> curl -sS http://getcomposer.org/installer | php
$> php composer.phar install
```
### Usage
``` php
<?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](https://github.com/jhedstrom/DrupalDriver/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
See [CONTRIBUTING.md](https://github.com/jhedstrom/DrupalDriver/blob/master/CONTRIBUTING.md) for more information.
### Release notes
See [CHANGELOG](CHANGELOG.MD).
", Assign "at most 3 tags" to the expected json: {"id":"11017","tags":[]} "only from the tags list I provide: []" returns me the "expected json"