PHP code example of acquia / drupal-spec-tool
1. Go to this page and download the library: Download acquia/drupal-spec-tool library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
acquia / drupal-spec-tool example snippets
namespace AcmeCorp;
class CustomContentModelContext extends Acquia\DrupalSpecTool\Context\ContentModelContext {
/**
* Override existing functionality.
*
* @Then exactly the following content entity type bundles should exist
*/
public function assertBundles(TableNode $expected) {
// ...
}
/**
* Add new functionality.
*
* @Then something new should be true
*/
public function assertSomethingNew(TableNode $expected) {
// ...
}
}