#606526 by axyjo and scor: Remove trailing whitespace and add newlines at end of files. Sorry, folks! But it is after code freeze. :)
parent
5f40bd5bec
commit
ea1bd5606c
|
@ -133,14 +133,14 @@ Drupal 7.0, xxxx-xx-xx (development version)
|
||||||
* Added the hook_file_url_alter() hook, which makes it possible to serve
|
* Added the hook_file_url_alter() hook, which makes it possible to serve
|
||||||
files from a CDN.
|
files from a CDN.
|
||||||
* Added a field specifically for uploading files, previously provided by
|
* Added a field specifically for uploading files, previously provided by
|
||||||
the contributed module FileField.
|
the contributed module FileField.
|
||||||
- Image handling:
|
- Image handling:
|
||||||
* Improved image handling, including better support for add-on image
|
* Improved image handling, including better support for add-on image
|
||||||
libraries.
|
libraries.
|
||||||
* Added API and interface for creating advanced image thumbnails.
|
* Added API and interface for creating advanced image thumbnails.
|
||||||
* Inclusion of additional effects such as rotate and desaturate.
|
* Inclusion of additional effects such as rotate and desaturate.
|
||||||
* Added a field specifically for uploading images, previously provided by
|
* Added a field specifically for uploading images, previously provided by
|
||||||
the contributed module ImageField.
|
the contributed module ImageField.
|
||||||
- Added aliased multi-site support:
|
- Added aliased multi-site support:
|
||||||
* Added support for mapping domain names to sites directories.
|
* Added support for mapping domain names to sites directories.
|
||||||
- Added RDF support:
|
- Added RDF support:
|
||||||
|
|
|
@ -4,7 +4,7 @@ SQLITE REQUIREMENTS
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
To use SQLite with your Drupal installation, the following requirements must
|
To use SQLite with your Drupal installation, the following requirements must
|
||||||
be met: server has PHP 5.2 or later with PDO, and the PDO SQLite driver must
|
be met: server has PHP 5.2 or later with PDO, and the PDO SQLite driver must
|
||||||
be enabled.
|
be enabled.
|
||||||
|
|
||||||
SQLITE DATABASE CREATION
|
SQLITE DATABASE CREATION
|
||||||
|
|
|
@ -18,7 +18,7 @@ function aggregator_test_menu() {
|
||||||
/**
|
/**
|
||||||
* Page callback. Generates a test feed and simulates last-modified and etags.
|
* Page callback. Generates a test feed and simulates last-modified and etags.
|
||||||
*
|
*
|
||||||
* @param $use_last_modified
|
* @param $use_last_modified
|
||||||
* Set TRUE to send a last modified header.
|
* Set TRUE to send a last modified header.
|
||||||
* @param $use_etag
|
* @param $use_etag
|
||||||
* Set TRUE to send an etag.
|
* Set TRUE to send an etag.
|
||||||
|
|
|
@ -32,7 +32,7 @@ function block_help($path, $arg) {
|
||||||
case 'admin/structure/block/add':
|
case 'admin/structure/block/add':
|
||||||
return '<p>' . t('Use this page to create a new custom block. New blocks are disabled by default, and must be moved to a region on the <a href="@blocks">blocks administration page</a> to be visible.', array('@blocks' => url('admin/structure/block'))) . '</p>';
|
return '<p>' . t('Use this page to create a new custom block. New blocks are disabled by default, and must be moved to a region on the <a href="@blocks">blocks administration page</a> to be visible.', array('@blocks' => url('admin/structure/block'))) . '</p>';
|
||||||
}
|
}
|
||||||
if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && (empty($arg[3]) || $arg[3] == 'list')) {
|
if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && (empty($arg[3]) || $arg[3] == 'list')) {
|
||||||
$demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'garland');
|
$demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'garland');
|
||||||
$themes = list_themes();
|
$themes = list_themes();
|
||||||
$output = '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page. Click the <em>configure</em> link next to each block to configure its specific title and visibility settings.') . '</p>';
|
$output = '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page. Click the <em>configure</em> link next to each block to configure its specific title and visibility settings.') . '</p>';
|
||||||
|
@ -302,13 +302,13 @@ function _block_get_renderable_array($list = array()) {
|
||||||
* @param $theme
|
* @param $theme
|
||||||
* The theme to rehash blocks for. If not provided, defaults to the currently
|
* The theme to rehash blocks for. If not provided, defaults to the currently
|
||||||
* used theme.
|
* used theme.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* Blocks currently exported by modules.
|
* Blocks currently exported by modules.
|
||||||
*/
|
*/
|
||||||
function _block_rehash($theme = NULL) {
|
function _block_rehash($theme = NULL) {
|
||||||
global $theme_key;
|
global $theme_key;
|
||||||
|
|
||||||
drupal_theme_initialize();
|
drupal_theme_initialize();
|
||||||
|
|
||||||
if (!isset($theme)) {
|
if (!isset($theme)) {
|
||||||
|
@ -843,7 +843,7 @@ function _block_render_blocks($region_blocks) {
|
||||||
*/
|
*/
|
||||||
function _block_get_cache_id($block) {
|
function _block_get_cache_id($block) {
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
// User 1 being out of the regular 'roles define permissions' schema,
|
// User 1 being out of the regular 'roles define permissions' schema,
|
||||||
// it brings too many chances of having unwanted output get in the cache
|
// it brings too many chances of having unwanted output get in the cache
|
||||||
// and later be served to other users. We therefore exclude user 1 from
|
// and later be served to other users. We therefore exclude user 1 from
|
||||||
|
@ -906,7 +906,7 @@ function template_preprocess_block(&$variables) {
|
||||||
/**
|
/**
|
||||||
* Implement hook_user_role_delete().
|
* Implement hook_user_role_delete().
|
||||||
*
|
*
|
||||||
* Remove deleted role from blocks that use it.
|
* Remove deleted role from blocks that use it.
|
||||||
*/
|
*/
|
||||||
function block_user_role_delete($role) {
|
function block_user_role_delete($role) {
|
||||||
db_delete('block_role')
|
db_delete('block_role')
|
||||||
|
|
|
@ -111,17 +111,17 @@ class BlockTestCase extends DrupalWebTestCase {
|
||||||
*/
|
*/
|
||||||
function testBlockVisibility() {
|
function testBlockVisibility() {
|
||||||
$block = array();
|
$block = array();
|
||||||
|
|
||||||
// Create a random title for the block
|
// Create a random title for the block
|
||||||
$title = $this->randomName(8);
|
$title = $this->randomName(8);
|
||||||
|
|
||||||
// Create the custom block
|
// Create the custom block
|
||||||
$custom_block = array();
|
$custom_block = array();
|
||||||
$custom_block['info'] = $this->randomName(8);
|
$custom_block['info'] = $this->randomName(8);
|
||||||
$custom_block['title'] = $title;
|
$custom_block['title'] = $title;
|
||||||
$custom_block['body'] = $this->randomName(32);
|
$custom_block['body'] = $this->randomName(32);
|
||||||
$this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
|
$this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
|
||||||
|
|
||||||
$bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
|
$bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
|
||||||
$block['module'] = 'block';
|
$block['module'] = 'block';
|
||||||
$block['delta'] = $bid;
|
$block['delta'] = $bid;
|
||||||
|
@ -253,7 +253,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
|
||||||
'group' => 'Block',
|
'group' => 'Block',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the enabled Garland blocks are correctly copied over.
|
* Check the enabled Garland blocks are correctly copied over.
|
||||||
*/
|
*/
|
||||||
|
@ -297,7 +297,7 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase {
|
||||||
'group' => 'Block',
|
'group' => 'Block',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for the accessibility of the admin theme on the block admin page.
|
* Check for the accessibility of the admin theme on the block admin page.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -354,7 +354,7 @@ class FieldSqlStorageTestCase extends DrupalWebTestCase {
|
||||||
$indexes = $this->getIndexes($table);
|
$indexes = $this->getIndexes($table);
|
||||||
$this->assertTrue($indexes["{$field_name}_value"] == array(1 => "{$field_name}_value"), t("Index on value created in $table"));
|
$this->assertTrue($indexes["{$field_name}_value"] == array(1 => "{$field_name}_value"), t("Index on value created in $table"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a different index, removing the existing custom one.
|
// Add a different index, removing the existing custom one.
|
||||||
$field = array('field_name' => $field_name, 'indexes' => array('value_format' => array('value', 'format')));
|
$field = array('field_name' => $field_name, 'indexes' => array('value_format' => array('value', 'format')));
|
||||||
field_update_field($field);
|
field_update_field($field);
|
||||||
|
@ -363,14 +363,14 @@ class FieldSqlStorageTestCase extends DrupalWebTestCase {
|
||||||
$this->assertTrue($indexes["{$field_name}_value_format"] == array(1 => "{$field_name}_value", 2 => "{$field_name}_format"), t("Index on value_format created in $table"));
|
$this->assertTrue($indexes["{$field_name}_value_format"] == array(1 => "{$field_name}_value", 2 => "{$field_name}_format"), t("Index on value_format created in $table"));
|
||||||
$this->assertTrue(empty($indexes["{$field_name}_value"]), t("Index on value removed in $table"));
|
$this->assertTrue(empty($indexes["{$field_name}_value"]), t("Index on value removed in $table"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify that the tables were not dropped.
|
// Verify that the tables were not dropped.
|
||||||
$entity = field_test_create_stub_entity(0, 0, $instance['bundle']);
|
$entity = field_test_create_stub_entity(0, 0, $instance['bundle']);
|
||||||
field_attach_load('test_entity', array(0 => $entity));
|
field_attach_load('test_entity', array(0 => $entity));
|
||||||
$this->assertEqual($entity->{$field_name}[FIELD_LANGUAGE_NONE][0]['value'], 'field data', t("Index changes performed without dropping the tables"));
|
$this->assertEqual($entity->{$field_name}[FIELD_LANGUAGE_NONE][0]['value'], 'field data', t("Index changes performed without dropping the tables"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the storage details.
|
* Test the storage details.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -151,7 +151,7 @@ function options_buttons_elements_process($element, &$form_state, $form) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If required and there is one option, make it the default.
|
// If required and there is one option, make it the default.
|
||||||
if ($required && count($options) == 1) {
|
if ($required && count($options) == 1) {
|
||||||
$keys = array_keys($options);
|
$keys = array_keys($options);
|
||||||
|
|
|
@ -72,7 +72,7 @@ class OptionsWidgetsTestCase extends DrupalWebTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an <option> element by value from rendered HTML, or
|
* Return an <option> element by value from rendered HTML, or
|
||||||
* '' if it is not found.
|
* '' if it is not found.
|
||||||
*/
|
*/
|
||||||
function getOptionByValue($html, $value) {
|
function getOptionByValue($html, $value) {
|
||||||
if (preg_match('@(<option[^>]*value="' . $value . '"[^>]*>[^<]*</option>)@i', $html, $m)) {
|
if (preg_match('@(<option[^>]*value="' . $value . '"[^>]*>[^<]*</option>)@i', $html, $m)) {
|
||||||
|
|
|
@ -534,7 +534,7 @@ class FileFieldPathTestCase extends FileFieldTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A loose assertion to check that a file is uploaded to the right location.
|
* A loose assertion to check that a file is uploaded to the right location.
|
||||||
*
|
*
|
||||||
* @param $expected_path
|
* @param $expected_path
|
||||||
* The location where the file is expected to be uploaded. Duplicate file
|
* The location where the file is expected to be uploaded. Duplicate file
|
||||||
* names to not need to be taken into account.
|
* names to not need to be taken into account.
|
||||||
|
|
|
@ -467,7 +467,7 @@ class FilterDefaultFormatTestCase extends DrupalWebTestCase {
|
||||||
'group' => 'Filter',
|
'group' => 'Filter',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDefaultTextFormats() {
|
function testDefaultTextFormats() {
|
||||||
// Create two text formats, and two users. The first user has access to
|
// Create two text formats, and two users. The first user has access to
|
||||||
// both formats, but the second user only has access to the second one.
|
// both formats, but the second user only has access to the second one.
|
||||||
|
@ -1024,11 +1024,11 @@ class FilterUnitTestCase extends DrupalUnitTestCase {
|
||||||
$f = _filter_htmlcorrector('test <!--this is a comment-->');
|
$f = _filter_htmlcorrector('test <!--this is a comment-->');
|
||||||
$this->assertEqual($f, 'test <!--this is a comment-->', t('HTML corrector -- Do not touch HTML comments.'));
|
$this->assertEqual($f, 'test <!--this is a comment-->', t('HTML corrector -- Do not touch HTML comments.'));
|
||||||
|
|
||||||
$f = _filter_htmlcorrector('test <!-- comment <p>another
|
$f = _filter_htmlcorrector('test <!-- comment <p>another
|
||||||
<strong>multiple</strong> line
|
<strong>multiple</strong> line
|
||||||
comment</p> -->');
|
comment</p> -->');
|
||||||
$this->assertEqual($f, 'test <!-- comment <p>another
|
$this->assertEqual($f, 'test <!-- comment <p>another
|
||||||
<strong>multiple</strong> line
|
<strong>multiple</strong> line
|
||||||
comment</p> -->', t('HTML corrector -- Do not touch HTML comments.'));
|
comment</p> -->', t('HTML corrector -- Do not touch HTML comments.'));
|
||||||
|
|
||||||
$f = _filter_htmlcorrector('test <!-- comment <p>another comment</p> -->');
|
$f = _filter_htmlcorrector('test <!-- comment <p>another comment</p> -->');
|
||||||
|
|
|
@ -82,7 +82,7 @@ class ImageStylesPathAndUrlUnitTest extends DrupalWebTestCase {
|
||||||
*/
|
*/
|
||||||
function _testImageStyleUrlAndPath($scheme) {
|
function _testImageStyleUrlAndPath($scheme) {
|
||||||
// Make the default scheme neither "public" nor "private" to verify the
|
// Make the default scheme neither "public" nor "private" to verify the
|
||||||
// functions work for other than the default scheme.
|
// functions work for other than the default scheme.
|
||||||
variable_set('file_default_scheme', 'temporary');
|
variable_set('file_default_scheme', 'temporary');
|
||||||
file_prepare_directory($d = 'temporary://', FILE_CREATE_DIRECTORY);
|
file_prepare_directory($d = 'temporary://', FILE_CREATE_DIRECTORY);
|
||||||
|
|
||||||
|
|
|
@ -468,7 +468,7 @@ function locale_theme() {
|
||||||
*/
|
*/
|
||||||
function locale_field_attach_view_alter(&$output, $context) {
|
function locale_field_attach_view_alter(&$output, $context) {
|
||||||
// In locale_field_fallback_view() we might call field_attach_view(). The
|
// In locale_field_fallback_view() we might call field_attach_view(). The
|
||||||
// static variable avoids unnecessary recursion.
|
// static variable avoids unnecessary recursion.
|
||||||
static $recursion;
|
static $recursion;
|
||||||
|
|
||||||
// Do not apply fallback rules if disabled or if Locale is not registered as a
|
// Do not apply fallback rules if disabled or if Locale is not registered as a
|
||||||
|
|
|
@ -1690,7 +1690,7 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
|
||||||
$assert = isset($node->body['it']) && !isset($node->body['en']) && $node->body['it'][0]['value'] == $body_value;
|
$assert = isset($node->body['it']) && !isset($node->body['en']) && $node->body['it'][0]['value'] == $body_value;
|
||||||
$this->assertTrue($assert, t('Field language correctly changed.'));
|
$this->assertTrue($assert, t('Field language correctly changed.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test multilingual field display settings.
|
* Test multilingual field display settings.
|
||||||
*/
|
*/
|
||||||
|
@ -1708,11 +1708,11 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
|
||||||
$edit[$body_key] = $body_value;
|
$edit[$body_key] = $body_value;
|
||||||
$edit['language'] = 'en';
|
$edit['language'] = 'en';
|
||||||
$this->drupalPost('node/add/page', $edit, t('Save'));
|
$this->drupalPost('node/add/page', $edit, t('Save'));
|
||||||
|
|
||||||
// Check that the node exists in the database.
|
// Check that the node exists in the database.
|
||||||
$node = $this->drupalGetNodeByTitle($edit[$title_key]);
|
$node = $this->drupalGetNodeByTitle($edit[$title_key]);
|
||||||
$this->assertTrue($node, t('Node found in database.'));
|
$this->assertTrue($node, t('Node found in database.'));
|
||||||
|
|
||||||
// Check if node body is showed.
|
// Check if node body is showed.
|
||||||
$this->drupalGet("node/$node->nid");
|
$this->drupalGet("node/$node->nid");
|
||||||
$body_xpath = '//div[@id="node-' . $node->nid . '"]//div[@property="content:encoded"]/p';
|
$body_xpath = '//div[@id="node-' . $node->nid . '"]//div[@property="content:encoded"]/p';
|
||||||
|
|
|
@ -181,7 +181,7 @@ class MenuTestCase extends DrupalWebTestCase {
|
||||||
$this->assertFalse(menu_load($menu_name), 'Custom menu was deleted');
|
$this->assertFalse(menu_load($menu_name), 'Custom menu was deleted');
|
||||||
// Test if all menu links associated to the menu were removed from database.
|
// Test if all menu links associated to the menu were removed from database.
|
||||||
$result = db_query("SELECT menu_name FROM {menu_links} WHERE menu_name = :menu_name", array(':menu_name' => $menu_name))->fetchField();
|
$result = db_query("SELECT menu_name FROM {menu_links} WHERE menu_name = :menu_name", array(':menu_name' => $menu_name))->fetchField();
|
||||||
$this->assertFalse($result, t('All menu links associated to the custom menu were deleted.'));
|
$this->assertFalse($result, t('All menu links associated to the custom menu were deleted.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,7 +33,7 @@ html.js #user-login li.openid-link {
|
||||||
#user-login li.user-link {
|
#user-login li.user-link {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#user-login-form li.openid-link a,
|
#user-login-form li.openid-link a,
|
||||||
#user-login li.openid-link a {
|
#user-login li.openid-link a {
|
||||||
background: transparent url("login-bg.png") no-repeat 0 2px;
|
background: transparent url("login-bg.png") no-repeat 0 2px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
|
|
|
@ -22,7 +22,7 @@ body {
|
||||||
* CSS spec says that all whitespace is valid whitespace, so this selector should be just as
|
* CSS spec says that all whitespace is valid whitespace, so this selector should be just as
|
||||||
* good as the one above.
|
* good as the one above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.this
|
.this
|
||||||
.is
|
.is
|
||||||
.a
|
.a
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
body{margin:0;padding:0;background:#edf5fa;font:76%/170% Verdana,sans-serif;color:#494949;}.this .is .a .test{font:1em/100% Verdana,sans-serif;color:#494949;}
|
body{margin:0;padding:0;background:#edf5fa;font:76%/170% Verdana,sans-serif;color:#494949;}.this .is .a .test{font:1em/100% Verdana,sans-serif;color:#494949;}
|
||||||
|
|
||||||
.this
|
.this
|
||||||
.is
|
.is
|
||||||
.a
|
.a
|
||||||
|
|
|
@ -22,7 +22,7 @@ body {
|
||||||
* CSS spec says that all whitespace is valid whitespace, so this selector should be just as
|
* CSS spec says that all whitespace is valid whitespace, so this selector should be just as
|
||||||
* good as the one above.
|
* good as the one above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.this
|
.this
|
||||||
.is
|
.is
|
||||||
.a
|
.a
|
||||||
|
|
|
@ -118,7 +118,7 @@ class ActionLoopTestCase extends DrupalWebTestCase {
|
||||||
$result = db_query("SELECT * FROM {watchdog} WHERE type = 'actions_loop_test' OR type = 'actions' ORDER BY timestamp");
|
$result = db_query("SELECT * FROM {watchdog} WHERE type = 'actions_loop_test' OR type = 'actions' ORDER BY timestamp");
|
||||||
$loop_started = FALSE;
|
$loop_started = FALSE;
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
|
|
||||||
$expected_message = array_shift($expected);
|
$expected_message = array_shift($expected);
|
||||||
$this->assertEqual($row->message, $expected_message, t('Expected message %expected, got %message.', array('%expected' => $expected_message, '%message' => $row->message)));
|
$this->assertEqual($row->message, $expected_message, t('Expected message %expected, got %message.', array('%expected' => $expected_message, '%message' => $row->message)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test page compression.
|
* Test page compression.
|
||||||
*
|
*
|
||||||
* The test should pass even if zlib.output_compression is enabled in php.ini,
|
* The test should pass even if zlib.output_compression is enabled in php.ini,
|
||||||
* .htaccess or similar, or if compression is done outside PHP, e.g. by the
|
* .htaccess or similar, or if compression is done outside PHP, e.g. by the
|
||||||
* mod_deflate Apache module.
|
* mod_deflate Apache module.
|
||||||
|
@ -356,7 +356,7 @@ class BootstrapTimerTestCase extends DrupalUnitTestCase {
|
||||||
/**
|
/**
|
||||||
* Test timer_read() to ensure it properly accumulates time when the timer
|
* Test timer_read() to ensure it properly accumulates time when the timer
|
||||||
* started and stopped multiple times.
|
* started and stopped multiple times.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
function testTimer() {
|
function testTimer() {
|
||||||
timer_start('test');
|
timer_start('test');
|
||||||
|
|
|
@ -149,7 +149,7 @@ function database_test_tablesort() {
|
||||||
$query = db_select('test_task', 't');
|
$query = db_select('test_task', 't');
|
||||||
$query
|
$query
|
||||||
->fields('t', array('tid', 'pid', 'task', 'priority'));
|
->fields('t', array('tid', 'pid', 'task', 'priority'));
|
||||||
|
|
||||||
$query = $query->extend('TableSort')->orderByHeader($header);
|
$query = $query->extend('TableSort')->orderByHeader($header);
|
||||||
|
|
||||||
// We need all the results at once to check the sort.
|
// We need all the results at once to check the sort.
|
||||||
|
@ -178,7 +178,7 @@ function database_test_tablesort_first() {
|
||||||
$query = db_select('test_task', 't');
|
$query = db_select('test_task', 't');
|
||||||
$query
|
$query
|
||||||
->fields('t', array('tid', 'pid', 'task', 'priority'));
|
->fields('t', array('tid', 'pid', 'task', 'priority'));
|
||||||
|
|
||||||
$query = $query->extend('TableSort')->orderByHeader($header)->orderBy('priority');
|
$query = $query->extend('TableSort')->orderByHeader($header)->orderBy('priority');
|
||||||
|
|
||||||
// We need all the results at once to check the sort.
|
// We need all the results at once to check the sort.
|
||||||
|
|
|
@ -1892,7 +1892,7 @@ class FileDownloadTest extends FileTestCase {
|
||||||
$this->assertEqual($GLOBALS['base_url'] . '/' . file_directory_path() . '/' . $file->filename, $url, t('Correctly generated a URL for a created file.'));
|
$this->assertEqual($GLOBALS['base_url'] . '/' . file_directory_path() . '/' . $file->filename, $url, t('Correctly generated a URL for a created file.'));
|
||||||
$this->drupalHead($url);
|
$this->drupalHead($url);
|
||||||
$this->assertResponse(200, t('Confirmed that the generated URL is correct by downloading the created file.'));
|
$this->assertResponse(200, t('Confirmed that the generated URL is correct by downloading the created file.'));
|
||||||
|
|
||||||
// Test generating an URL to a shipped file (i.e. a file that is part of
|
// Test generating an URL to a shipped file (i.e. a file that is part of
|
||||||
// Drupal core, a module or a theme, for example a JavaScript file).
|
// Drupal core, a module or a theme, for example a JavaScript file).
|
||||||
$filepath = 'misc/jquery.js';
|
$filepath = 'misc/jquery.js';
|
||||||
|
|
|
@ -97,7 +97,7 @@ class TestFileTransfer extends FileTransfer {
|
||||||
protected $username = NULL;
|
protected $username = NULL;
|
||||||
protected $password = NULL;
|
protected $password = NULL;
|
||||||
protected $port = NULL;
|
protected $port = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is for testing the CopyRecursive logic.
|
* This is for testing the CopyRecursive logic.
|
||||||
*/
|
*/
|
||||||
|
@ -135,7 +135,7 @@ class TestFileTransfer extends FileTransfer {
|
||||||
throw new FileTransferException('Unable to remove to file @file.', NULL, array('@file' => $item));
|
throw new FileTransferException('Unable to remove to file @file.', NULL, array('@file' => $item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isDirectory($path) {
|
function isDirectory($path) {
|
||||||
return $this->shouldIsDirectoryReturnTrue;
|
return $this->shouldIsDirectoryReturnTrue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@ function _form_test_tableselect_js_select_form($form, $form_state, $action) {
|
||||||
* drupal_form_submit using the values specified in this function.
|
* drupal_form_submit using the values specified in this function.
|
||||||
*
|
*
|
||||||
* The form's field test_value begins at 'initial_value', and is changed
|
* The form's field test_value begins at 'initial_value', and is changed
|
||||||
* to 'form_submitted' when the form is submitted successfully. On
|
* to 'form_submitted' when the form is submitted successfully. On
|
||||||
* completion this function is passed 'done' to complete the process.
|
* completion this function is passed 'done' to complete the process.
|
||||||
*/
|
*/
|
||||||
function form_test_drupal_form_submit_batch_api($arg = '') {
|
function form_test_drupal_form_submit_batch_api($arg = '') {
|
||||||
|
|
|
@ -125,9 +125,9 @@ function menu_test_theme_callback($argument) {
|
||||||
* Helper function for the testMenuName() test. Used to change the menu_name
|
* Helper function for the testMenuName() test. Used to change the menu_name
|
||||||
* parameter of a menu.
|
* parameter of a menu.
|
||||||
*
|
*
|
||||||
* @param $new_name
|
* @param $new_name
|
||||||
* If set, will change the menu_name value.
|
* If set, will change the menu_name value.
|
||||||
* @return
|
* @return
|
||||||
* The menu_name value to use.
|
* The menu_name value to use.
|
||||||
*/
|
*/
|
||||||
function menu_test_menu_name($new_name = '') {
|
function menu_test_menu_name($new_name = '') {
|
||||||
|
|
|
@ -9,7 +9,7 @@ function system_test_menu() {
|
||||||
'page callback' => 'system_test_batch_theme',
|
'page callback' => 'system_test_batch_theme',
|
||||||
'access callback' => TRUE,
|
'access callback' => TRUE,
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_CALLBACK,
|
||||||
);
|
);
|
||||||
$items['system-test/sleep/%'] = array(
|
$items['system-test/sleep/%'] = array(
|
||||||
'page callback' => 'system_test_sleep',
|
'page callback' => 'system_test_sleep',
|
||||||
'page arguments' => array(2),
|
'page arguments' => array(2),
|
||||||
|
|
|
@ -26,7 +26,7 @@ class SyslogTestCase extends DrupalWebTestCase {
|
||||||
if (defined('LOG_LOCAL6')) {
|
if (defined('LOG_LOCAL6')) {
|
||||||
$this->drupalPost('admin/config/development/logging', array('syslog_facility' => LOG_LOCAL6), t('Save configuration'));
|
$this->drupalPost('admin/config/development/logging', array('syslog_facility' => LOG_LOCAL6), t('Save configuration'));
|
||||||
$this->assertText(t('The configuration options have been saved.'));
|
$this->assertText(t('The configuration options have been saved.'));
|
||||||
|
|
||||||
$this->drupalGet('admin/config/development/logging');
|
$this->drupalGet('admin/config/development/logging');
|
||||||
if ($this->parse()) {
|
if ($this->parse()) {
|
||||||
$field = $this->xpath('//option[@value="' . LOG_LOCAL6 . '"]'); // Should be one field.
|
$field = $this->xpath('//option[@value="' . LOG_LOCAL6 . '"]'); // Should be one field.
|
||||||
|
|
|
@ -41,7 +41,7 @@ div#toolbar {
|
||||||
|
|
||||||
div#toolbar .collapsed {
|
div#toolbar .collapsed {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#toolbar div.shadow {
|
div#toolbar div.shadow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* Implementation of hook_install().
|
* Implementation of hook_install().
|
||||||
*
|
*
|
||||||
* @todo
|
* @todo
|
||||||
* Implement role based shortcut bars.
|
* Implement role based shortcut bars.
|
||||||
*/
|
*/
|
||||||
function toolbar_install() {
|
function toolbar_install() {
|
||||||
$t = get_t();
|
$t = get_t();
|
||||||
|
|
|
@ -32,7 +32,7 @@ function toolbar_theme($existing, $type, $theme, $path) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement hook_page_build().
|
* Implement hook_page_build().
|
||||||
*
|
*
|
||||||
* Add admin toolbar to the page_top region automatically.
|
* Add admin toolbar to the page_top region automatically.
|
||||||
*/
|
*/
|
||||||
function toolbar_page_build(&$page) {
|
function toolbar_page_build(&$page) {
|
||||||
|
@ -180,7 +180,7 @@ function toolbar_menu_navigation_links($tree) {
|
||||||
/**
|
/**
|
||||||
* Checks whether an item is in the active trail.
|
* Checks whether an item is in the active trail.
|
||||||
*
|
*
|
||||||
* Useful when using a menu generated by menu_tree_all_data() which does
|
* Useful when using a menu generated by menu_tree_all_data() which does
|
||||||
* not set the 'in_active_trail' flag on items.
|
* not set the 'in_active_trail' flag on items.
|
||||||
*
|
*
|
||||||
* @todo
|
* @todo
|
||||||
|
|
|
@ -46,7 +46,7 @@ function update_schema() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a queue to store tasks for requests to fetch available update data.
|
* Create a queue to store tasks for requests to fetch available update data.
|
||||||
*/
|
*/
|
||||||
function update_update_7000() {
|
function update_update_7000() {
|
||||||
module_load_include('inc', 'system', 'system.queue');
|
module_load_include('inc', 'system', 'system.queue');
|
||||||
|
|
|
@ -9,16 +9,16 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
'group' => 'User'
|
'group' => 'User'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRegistrationWithEmailVerification() {
|
function testRegistrationWithEmailVerification() {
|
||||||
// Require e-mail verification.
|
// Require e-mail verification.
|
||||||
variable_set('user_email_verification', TRUE);
|
variable_set('user_email_verification', TRUE);
|
||||||
|
|
||||||
// Set registration to administrator only.
|
// Set registration to administrator only.
|
||||||
variable_set('user_register', 0);
|
variable_set('user_register', 0);
|
||||||
$this->drupalGet('user/register');
|
$this->drupalGet('user/register');
|
||||||
$this->assertResponse(403, t('Registration page is inaccessible when only administrators can create accounts.'));
|
$this->assertResponse(403, t('Registration page is inaccessible when only administrators can create accounts.'));
|
||||||
|
|
||||||
// Allow registration by site visitors without administrator approval.
|
// Allow registration by site visitors without administrator approval.
|
||||||
variable_set('user_register', 1);
|
variable_set('user_register', 1);
|
||||||
$edit = array();
|
$edit = array();
|
||||||
|
@ -28,7 +28,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
$this->assertText(t('Your password and further instructions have been sent to your e-mail address.'), t('User registered successfully.'));
|
$this->assertText(t('Your password and further instructions have been sent to your e-mail address.'), t('User registered successfully.'));
|
||||||
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
||||||
$this->assertTrue($new_user->status, t('New account is active after registration.'));
|
$this->assertTrue($new_user->status, t('New account is active after registration.'));
|
||||||
|
|
||||||
// Allow registration by site visitors, but require administrator approval.
|
// Allow registration by site visitors, but require administrator approval.
|
||||||
variable_set('user_register', 2);
|
variable_set('user_register', 2);
|
||||||
$edit = array();
|
$edit = array();
|
||||||
|
@ -38,17 +38,17 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
||||||
$this->assertFalse($new_user->status, t('New account is blocked until approved by an administrator.'));
|
$this->assertFalse($new_user->status, t('New account is blocked until approved by an administrator.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRegistrationWithoutEmailVerification() {
|
function testRegistrationWithoutEmailVerification() {
|
||||||
// Don't require e-mail verification.
|
// Don't require e-mail verification.
|
||||||
variable_set('user_email_verification', FALSE);
|
variable_set('user_email_verification', FALSE);
|
||||||
|
|
||||||
// Allow registration by site visitors without administrator approval.
|
// Allow registration by site visitors without administrator approval.
|
||||||
variable_set('user_register', 1);
|
variable_set('user_register', 1);
|
||||||
$edit = array();
|
$edit = array();
|
||||||
$edit['name'] = $name = $this->randomName();
|
$edit['name'] = $name = $this->randomName();
|
||||||
$edit['mail'] = $mail = $edit['name'] . '@example.com';
|
$edit['mail'] = $mail = $edit['name'] . '@example.com';
|
||||||
|
|
||||||
// Try entering a mismatching password.
|
// Try entering a mismatching password.
|
||||||
$edit['pass[pass1]'] = '99999.0';
|
$edit['pass[pass1]'] = '99999.0';
|
||||||
$edit['pass[pass2]'] = '99999';
|
$edit['pass[pass2]'] = '99999';
|
||||||
|
@ -62,7 +62,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
||||||
$this->assertText(t('Registration successful. You are now logged in.'), t('Users are logged in after registering.'));
|
$this->assertText(t('Registration successful. You are now logged in.'), t('Users are logged in after registering.'));
|
||||||
$this->drupalLogout();
|
$this->drupalLogout();
|
||||||
|
|
||||||
// Allow registration by site visitors, but require administrator approval.
|
// Allow registration by site visitors, but require administrator approval.
|
||||||
variable_set('user_register', 2);
|
variable_set('user_register', 2);
|
||||||
$edit = array();
|
$edit = array();
|
||||||
|
@ -72,7 +72,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
$edit['pass[pass2]'] = $pass;
|
$edit['pass[pass2]'] = $pass;
|
||||||
$this->drupalPost('user/register', $edit, t('Create new account'));
|
$this->drupalPost('user/register', $edit, t('Create new account'));
|
||||||
$this->assertText(t('Thank you for applying for an account. Your account is currently pending approval by the site administrator.'), t('Users are notified of pending approval'));
|
$this->assertText(t('Thank you for applying for an account. Your account is currently pending approval by the site administrator.'), t('Users are notified of pending approval'));
|
||||||
|
|
||||||
// Try to login before administrator approval.
|
// Try to login before administrator approval.
|
||||||
$auth = array(
|
$auth = array(
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
|
@ -90,7 +90,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
);
|
);
|
||||||
$this->drupalPost('user/' . $new_user->uid . '/edit', $edit, t('Save'));
|
$this->drupalPost('user/' . $new_user->uid . '/edit', $edit, t('Save'));
|
||||||
$this->drupalLogout();
|
$this->drupalLogout();
|
||||||
|
|
||||||
// Login after administrator approval.
|
// Login after administrator approval.
|
||||||
$this->drupalPost('user/login', $auth, t('Log in'));
|
$this->drupalPost('user/login', $auth, t('Log in'));
|
||||||
$this->assertText(t('Member for'), t('User can log in after administrator approval.'));
|
$this->assertText(t('Member for'), t('User can log in after administrator approval.'));
|
||||||
|
@ -99,21 +99,21 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
function testRegistrationDefaultValues() {
|
function testRegistrationDefaultValues() {
|
||||||
// Allow registration by site visitors without administrator approval.
|
// Allow registration by site visitors without administrator approval.
|
||||||
variable_set('user_register', 1);
|
variable_set('user_register', 1);
|
||||||
|
|
||||||
// Don't require e-mail verification.
|
// Don't require e-mail verification.
|
||||||
variable_set('user_email_verification', FALSE);
|
variable_set('user_email_verification', FALSE);
|
||||||
|
|
||||||
// Set the default timezone to Brussels.
|
// Set the default timezone to Brussels.
|
||||||
variable_set('configurable_timezones', 1);
|
variable_set('configurable_timezones', 1);
|
||||||
variable_set('date_default_timezone', 'Europe/Brussels');
|
variable_set('date_default_timezone', 'Europe/Brussels');
|
||||||
|
|
||||||
$edit = array();
|
$edit = array();
|
||||||
$edit['name'] = $name = $this->randomName();
|
$edit['name'] = $name = $this->randomName();
|
||||||
$edit['mail'] = $mail = $edit['name'] . '@example.com';
|
$edit['mail'] = $mail = $edit['name'] . '@example.com';
|
||||||
$edit['pass[pass1]'] = $new_pass = $this->randomName();
|
$edit['pass[pass1]'] = $new_pass = $this->randomName();
|
||||||
$edit['pass[pass2]'] = $new_pass;
|
$edit['pass[pass2]'] = $new_pass;
|
||||||
$this->drupalPost('user/register', $edit, t('Create new account'));
|
$this->drupalPost('user/register', $edit, t('Create new account'));
|
||||||
|
|
||||||
// Check user fields.
|
// Check user fields.
|
||||||
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
$new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
|
||||||
$this->assertEqual($new_user->name, $name, t('Username matches.'));
|
$this->assertEqual($new_user->name, $name, t('Username matches.'));
|
||||||
|
|
|
@ -8,7 +8,7 @@ dependencies[] = color
|
||||||
dependencies[] = comment
|
dependencies[] = comment
|
||||||
dependencies[] = dashboard
|
dependencies[] = dashboard
|
||||||
dependencies[] = help
|
dependencies[] = help
|
||||||
dependencies[] = image
|
dependencies[] = image
|
||||||
dependencies[] = menu
|
dependencies[] = menu
|
||||||
dependencies[] = path
|
dependencies[] = path
|
||||||
dependencies[] = taxonomy
|
dependencies[] = taxonomy
|
||||||
|
|
|
@ -209,7 +209,7 @@ function default_install() {
|
||||||
'machine_name' => 'tags',
|
'machine_name' => 'tags',
|
||||||
'help' => $help,
|
'help' => $help,
|
||||||
|
|
||||||
);
|
);
|
||||||
taxonomy_vocabulary_save($vocabulary);
|
taxonomy_vocabulary_save($vocabulary);
|
||||||
$instance = array(
|
$instance = array(
|
||||||
'field_name' => 'taxonomy_' . $vocabulary->machine_name,
|
'field_name' => 'taxonomy_' . $vocabulary->machine_name,
|
||||||
|
|
|
@ -65,7 +65,7 @@ function expert_install() {
|
||||||
foreach ($values as $record) {
|
foreach ($values as $record) {
|
||||||
$query->values($record);
|
$query->values($record);
|
||||||
}
|
}
|
||||||
$query->execute();
|
$query->execute();
|
||||||
|
|
||||||
// Enable default permissions for system roles.
|
// Enable default permissions for system roles.
|
||||||
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'use text format 1'));
|
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'use text format 1'));
|
||||||
|
|
|
@ -141,7 +141,7 @@ All arguments are long options.
|
||||||
<test1>[,<test2>[,<test3> ...]]
|
<test1>[,<test2>[,<test3> ...]]
|
||||||
|
|
||||||
One or more tests to be run. By default, these are interpreted
|
One or more tests to be run. By default, these are interpreted
|
||||||
as the names of test groups as shown at
|
as the names of test groups as shown at
|
||||||
?q=admin/config/development/testing.
|
?q=admin/config/development/testing.
|
||||||
These group names typically correspond to module names like "User"
|
These group names typically correspond to module names like "User"
|
||||||
or "Profile" or "System", but there is also a group "XML-RPC".
|
or "Profile" or "System", but there is also a group "XML-RPC".
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset CSS styles.
|
* Reset CSS styles.
|
||||||
*
|
*
|
||||||
* Based on Eric Meyer's "Reset CSS 1.0" tool from
|
* Based on Eric Meyer's "Reset CSS 1.0" tool from
|
||||||
* http://meyerweb.com/eric/tools/css/reset
|
* http://meyerweb.com/eric/tools/css/reset
|
||||||
|
@ -184,8 +184,8 @@ q:before, q:after {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remember to highlight inserts somehow! */
|
/* Remember to highlight inserts somehow! */
|
||||||
ins {
|
ins {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
del {
|
del {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
@ -206,8 +206,8 @@ table {
|
||||||
input,
|
input,
|
||||||
select,
|
select,
|
||||||
textarea,
|
textarea,
|
||||||
body {
|
body {
|
||||||
font: 13px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font: 13px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue