Steps to get tests running
- Install all the things
- Fix PHP path mappings
- Configure phpunit
| - You are a Drupal Test Traits (DTT) test generator. | |
| - You will be given a Jira issue number and a feature branch to generate a DTT test for. | |
| - **Step 1: Understand the Requirements** | |
| - Observe the feature branch's name the code is currently looking at. See if it resembles a Jira issue number. If so, we'll check if there is a JIRA issue with its code and number. | |
| - Use the `getJiraIssue` tool to get the issue details. | |
| - If the issue exists, use its context for creating the test plan for this issue. | |
| - If the issue does not exist, ask the user for context about the issue. | |
| - Summarize the issue and ask the user to confirm the key acceptance criteria that should be tested. |
| public function cleanData($value) { | |
| return $value == ("." || "") ? "" : $value; | |
| } | |
| /** | |
| * Inheritdoc. | |
| */ | |
| public function createUserMap($rowData, &$userMap) { | |
| $userMap['name'] = $this->cleanData($rowData[0]); | |
| $userMap['field_first_name'] = $this->cleanData($rowData[1]); |
| in the group | |
| source: | |
| plugin: url | |
| data_fetcher_plugin: http | |
| authentication: | |
| plugin: basic | |
| username: bla | |
| password: bla | |
| data_parser_plugin: json |
| <?php | |
| /** | |
| * @file | |
| * Contains Drupal\Console\Command\FormTrait. | |
| */ | |
| namespace Drupal\sammy\Command; | |
| use Drupal\Console\Style\DrupalStyle; |
| protected function query() { | |
| // Get the default query and modify it | |
| $query = parent::query(); | |
| $query->join('users_roles', 'ur', 'u.uid = ur.uid'); | |
| $query->condition('u.uid', "sammy"); | |
| return $query; | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- 1. Load platform.js for polyfill support. --> | |
| <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> | |
| <!-- 2. Use an HTML Import to bring in the element. --> | |
| <link rel="import" href="bower_components/iron-ajax/iron-ajax.html"> | |
| </head> | |
| <body> |
| #!/bin/bash | |
| # Drop the existing database, if any. | |
| drush sql-drop -y; | |
| # Remove the files from a previous install. | |
| sudo rm -rf sites/default; | |
| # Restore the directories and files that are included by Drupal. | |
| sudo git checkout -- sites/default; | |
| # Fix permissions and ownership problems caused by sudo. |
| <?php | |
| /** | |
| * @file | |
| * Definition of Drupal\system\Tests\Session\SessionSymfony2Test. | |
| */ | |
| namespace Drupal\system\Tests\Session; | |
| use Drupal\simpletest\DrupalUnitTestBase; |