Steps to get tests running
- Install all the things
- Fix PHP path mappings
- Configure phpunit
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; |