drupal core updated to 7.28

This commit is contained in:
Bachir Soussi Chiadmi
2014-07-07 18:53:44 +02:00
parent 10de06dd70
commit c3011cef61
263 changed files with 3331 additions and 8894 deletions

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -497,6 +497,85 @@ class AJAXMultiFormTestCase extends AJAXTestCase {
}
}
/**
* Test Ajax forms when page caching for anonymous users is turned on.
*/
class AJAXFormPageCacheTestCase extends AJAXTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'AJAX forms on cached pages',
'description' => 'Tests that AJAX forms work properly for anonymous users on cached pages.',
'group' => 'AJAX',
);
}
public function setUp() {
parent::setUp();
variable_set('cache', TRUE);
}
/**
* Return the build id of the current form.
*/
protected function getFormBuildId() {
$build_id_fields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($build_id_fields), 1, 'One form build id field on the page');
return (string) $build_id_fields[0]['value'];
}
/**
* Create a simple form, then POST to system/ajax to change to it.
*/
public function testSimpleAJAXFormValue() {
$this->drupalGet('ajax_forms_test_get_form');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.');
$build_id_initial = $this->getFormBuildId();
$edit = array('select' => 'green');
$commands = $this->drupalPostAJAX(NULL, $edit, 'select');
$build_id_first_ajax = $this->getFormBuildId();
$this->assertNotEqual($build_id_initial, $build_id_first_ajax, 'Build id is changed in the simpletest-DOM on first AJAX submission');
$expected = array(
'command' => 'updateBuildId',
'old' => $build_id_initial,
'new' => $build_id_first_ajax,
);
$this->assertCommand($commands, $expected, 'Build id change command issued on first AJAX submission');
$edit = array('select' => 'red');
$commands = $this->drupalPostAJAX(NULL, $edit, 'select');
$build_id_second_ajax = $this->getFormBuildId();
$this->assertEqual($build_id_first_ajax, $build_id_second_ajax, 'Build id remains the same on subsequent AJAX submissions');
// Repeat the test sequence but this time with a page loaded from the cache.
$this->drupalGet('ajax_forms_test_get_form');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.');
$build_id_from_cache_initial = $this->getFormBuildId();
$this->assertEqual($build_id_initial, $build_id_from_cache_initial, 'Build id is the same as on the first request');
$edit = array('select' => 'green');
$commands = $this->drupalPostAJAX(NULL, $edit, 'select');
$build_id_from_cache_first_ajax = $this->getFormBuildId();
$this->assertNotEqual($build_id_from_cache_initial, $build_id_from_cache_first_ajax, 'Build id is changed in the simpletest-DOM on first AJAX submission');
$this->assertNotEqual($build_id_first_ajax, $build_id_from_cache_first_ajax, 'Build id from first user is not reused');
$expected = array(
'command' => 'updateBuildId',
'old' => $build_id_from_cache_initial,
'new' => $build_id_from_cache_first_ajax,
);
$this->assertCommand($commands, $expected, 'Build id change command issued on first AJAX submission');
$edit = array('select' => 'red');
$commands = $this->drupalPostAJAX(NULL, $edit, 'select');
$build_id_from_cache_second_ajax = $this->getFormBuildId();
$this->assertEqual($build_id_from_cache_first_ajax, $build_id_from_cache_second_ajax, 'Build id remains the same on subsequent AJAX submissions');
}
}
/**
* Miscellaneous Ajax tests using ajax_test module.
*/

View File

@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -219,6 +219,18 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
$this->assertFalse($this->drupalGetHeader('Content-Encoding'), 'A Content-Encoding header was not sent.');
$this->assertTitle(t('Welcome to @site-name | @site-name', array('@site-name' => variable_get('site_name', 'Drupal'))), 'Site title matches.');
$this->assertRaw('</html>', 'Page was not compressed.');
// Disable compression mode.
variable_set('page_compression', FALSE);
// Verify if cached page is still available for a client with compression support.
$this->drupalGet('', array(), array('Accept-Encoding: gzip,deflate'));
$this->drupalSetContent(gzinflate(substr($this->drupalGetContent(), 10, -8)));
$this->assertRaw('</html>', 'Page was delivered after compression mode is changed (compression support enabled).');
// Verify if cached page is still available for a client without compression support.
$this->drupalGet('');
$this->assertRaw('</html>', 'Page was delivered after compression mode is changed (compression support disabled).');
}
}

View File

@@ -686,6 +686,31 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
$this->assertEqual(trim($styles), $css_preprocessed, 'Rendering preprocessed inline CSS adds it to the page.');
}
/**
* Tests removing charset when rendering stylesheets with preprocessing on.
*/
function testRenderRemoveCharsetPreprocess() {
$cases = array(
array(
'asset' => '@charset "UTF-8";html{font-family:"sans-serif";}',
'expected' => 'html{font-family:"sans-serif";}',
),
// This asset contains extra \n character.
array(
'asset' => "@charset 'UTF-8';\nhtml{font-family:'sans-serif';}",
'expected' => "\nhtml{font-family:'sans-serif';}",
),
);
foreach ($cases as $case) {
$this->assertEqual(
$case['expected'],
drupal_load_stylesheet_content($case['asset']),
'CSS optimizing correctly removes the charset declaration.'
);
}
}
/**
* Tests rendering inline stylesheets with preprocessing off.
*/
@@ -901,26 +926,30 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase {
$testfiles = array(
'css_input_without_import.css',
'css_input_with_import.css',
'css_subfolder/css_input_with_import.css',
'comment_hacks.css'
);
$path = drupal_get_path('module', 'simpletest') . '/files/css_test_files';
foreach ($testfiles as $file) {
$expected = file_get_contents("$path/$file.unoptimized.css");
$unoptimized_output = drupal_load_stylesheet("$path/$file.unoptimized.css", FALSE);
$file_path = $path . '/' . $file;
$file_url = $GLOBALS['base_url'] . '/' . $file_path;
$expected = file_get_contents($file_path . '.unoptimized.css');
$unoptimized_output = drupal_load_stylesheet($file_path, FALSE);
$this->assertEqual($unoptimized_output, $expected, format_string('Unoptimized CSS file has expected contents (@file)', array('@file' => $file)));
$expected = file_get_contents("$path/$file.optimized.css");
$optimized_output = drupal_load_stylesheet("$path/$file", TRUE);
$expected = file_get_contents($file_path . '.optimized.css');
$optimized_output = drupal_load_stylesheet($file_path, TRUE);
$this->assertEqual($optimized_output, $expected, format_string('Optimized CSS file has expected contents (@file)', array('@file' => $file)));
// Repeat the tests by accessing the stylesheets by URL.
$expected = file_get_contents("$path/$file.unoptimized.css");
$unoptimized_output_url = drupal_load_stylesheet($GLOBALS['base_url'] . "/$path/$file.unoptimized.css", FALSE);
$this->assertEqual($unoptimized_output, $expected, format_string('Unoptimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file)));
$expected = file_get_contents($file_path . '.unoptimized.css');
$unoptimized_output_url = drupal_load_stylesheet($file_url, FALSE);
$this->assertEqual($unoptimized_output_url, $expected, format_string('Unoptimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file)));
$expected = file_get_contents("$path/$file.optimized.css");
$optimized_output = drupal_load_stylesheet($GLOBALS['base_url'] . "/$path/$file", TRUE);
$this->assertEqual($optimized_output, $expected, format_string('Optimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file)));
$expected = file_get_contents($file_path . '.optimized.css');
$optimized_output_url = drupal_load_stylesheet($file_url, TRUE);
$this->assertEqual($optimized_output_url, $expected, format_string('Optimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file)));
}
}
}
@@ -993,8 +1022,8 @@ class DrupalHTTPRequestTestCase extends DrupalWebTestCase {
$result = drupal_http_request($auth);
$this->drupalSetContent($result->data);
$this->assertRaw($username, '$_SERVER["PHP_AUTH_USER"] is passed correctly.');
$this->assertRaw($password, '$_SERVER["PHP_AUTH_PW"] is passed correctly.');
$this->assertRaw($username, 'Username is passed correctly.');
$this->assertRaw($password, 'Password is passed correctly.');
}
function testDrupalHTTPRequestRedirect() {
@@ -2756,3 +2785,28 @@ class ArrayDiffUnitTest extends DrupalUnitTestCase {
$this->assertIdentical(drupal_array_diff_assoc_recursive($this->array1, $this->array2), $expected);
}
}
/**
* Tests the functionality of drupal_get_query_array().
*/
class DrupalGetQueryArrayTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Query parsing using drupal_get_query_array()',
'description' => 'Tests that drupal_get_query_array() correctly parses query parameters.',
'group' => 'System',
);
}
/**
* Tests that drupal_get_query_array() correctly explodes query parameters.
*/
public function testDrupalGetQueryArray() {
$url = "http://my.site.com/somepath?foo=/content/folder[@name='foo']/folder[@name='bar']";
$parsed = parse_url($url);
$result = drupal_get_query_array($parsed['query']);
$this->assertEqual($result['foo'], "/content/folder[@name='foo']/folder[@name='bar']", 'drupal_get_query_array() should only explode parameters on the first equals sign.');
}
}

View File

@@ -7,8 +7,8 @@ stylesheets[all][] = common_test.css
stylesheets[print][] = common_test.print.css
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -87,6 +87,9 @@ function database_test_schema() {
),
);
$schema['test_people_copy'] = $schema['test_people'];
$schema['test_people_copy']['description'] = 'A duplicate version of the test_people table, used for additional tests.';
$schema['test_one_blob'] = array(
'description' => 'A simple table including a BLOB field for testing BLOB behavior.',
'fields' => array(

View File

@@ -23,6 +23,7 @@ class DatabaseTestCase extends DrupalWebTestCase {
$schema['test'] = drupal_get_schema('test');
$schema['test_people'] = drupal_get_schema('test_people');
$schema['test_people_copy'] = drupal_get_schema('test_people_copy');
$schema['test_one_blob'] = drupal_get_schema('test_one_blob');
$schema['test_two_blobs'] = drupal_get_schema('test_two_blobs');
$schema['test_task'] = drupal_get_schema('test_task');
@@ -603,9 +604,9 @@ class DatabaseInsertTestCase extends DatabaseTestCase {
}
/**
* Test that the INSERT INTO ... SELECT ... syntax works.
* Test that the INSERT INTO ... SELECT (fields) ... syntax works.
*/
function testInsertSelect() {
function testInsertSelectFields() {
$query = db_select('test_people', 'tp');
// The query builder will always append expressions after fields.
// Add the expression first to test that the insert fields are correctly
@@ -627,6 +628,27 @@ class DatabaseInsertTestCase extends DatabaseTestCase {
$saved_age = db_query('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Meredith'))->fetchField();
$this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
}
/**
* Tests that the INSERT INTO ... SELECT * ... syntax works.
*/
function testInsertSelectAll() {
$query = db_select('test_people', 'tp')
->fields('tp')
->condition('tp.name', 'Meredith');
// The resulting query should be equivalent to:
// INSERT INTO test_people_copy
// SELECT *
// FROM test_people tp
// WHERE tp.name = 'Meredith'
db_insert('test_people_copy')
->from($query)
->execute();
$saved_age = db_query('SELECT age FROM {test_people_copy} WHERE name = :name', array(':name' => 'Meredith'))->fetchField();
$this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
}
}
/**
@@ -2599,6 +2621,52 @@ class DatabaseTaggingTestCase extends DatabaseTestCase {
$this->assertFalse($query->hasAnyTag('other', 'stuff'), 'hasAnyTag() returned false.');
}
/**
* Confirm that an extended query has a "tag" added to it.
*/
function testExtenderHasTag() {
$query = db_select('test')
->extend('SelectQueryExtender');
$query->addField('test', 'name');
$query->addField('test', 'age', 'age');
$query->addTag('test');
$this->assertTrue($query->hasTag('test'), 'hasTag() returned true.');
$this->assertFalse($query->hasTag('other'), 'hasTag() returned false.');
}
/**
* Test extended query tagging "has all of these tags" functionality.
*/
function testExtenderHasAllTags() {
$query = db_select('test')
->extend('SelectQueryExtender');
$query->addField('test', 'name');
$query->addField('test', 'age', 'age');
$query->addTag('test');
$query->addTag('other');
$this->assertTrue($query->hasAllTags('test', 'other'), 'hasAllTags() returned true.');
$this->assertFalse($query->hasAllTags('test', 'stuff'), 'hasAllTags() returned false.');
}
/**
* Test extended query tagging "has at least one of these tags" functionality.
*/
function testExtenderHasAnyTag() {
$query = db_select('test')
->extend('SelectQueryExtender');
$query->addField('test', 'name');
$query->addField('test', 'age', 'age');
$query->addTag('test');
$this->assertTrue($query->hasAnyTag('test', 'other'), 'hasAnyTag() returned true.');
$this->assertFalse($query->hasAnyTag('other', 'stuff'), 'hasAnyTag() returned false.');
}
/**
* Test that we can attach meta data to a query object.
*
@@ -3069,6 +3137,15 @@ class DatabaseTemporaryQueryTestCase extends DrupalWebTestCase {
$this->assertEqual($this->countTableRows($table_name_system), $this->countTableRows("system"), 'A temporary table was created successfully in this request.');
$this->assertEqual($this->countTableRows($table_name_users), $this->countTableRows("users"), 'A second temporary table was created successfully in this request.');
// Check that leading whitespace and comments do not cause problems
// in the modified query.
$sql = "
-- Let's select some rows into a temporary table
SELECT name FROM {test}
";
$table_name_test = db_query_temporary($sql, array());
$this->assertEqual($this->countTableRows($table_name_test), $this->countTableRows('test'), 'Leading white space and comments do not interfere with temporary table creation.');
}
}

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = entity_cache_test_dependency
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -0,0 +1,49 @@
<?php
/**
* @file
* Tests for the Entity CRUD API.
*/
/**
* Tests the entity_load() function.
*/
class EntityLoadTestCase extends DrupalWebTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'Entity loading',
'description' => 'Tests the entity_load() function.',
'group' => 'Entity API',
);
}
/**
* Tests the functionality for loading entities matching certain conditions.
*/
public function testEntityLoadConditions() {
// Create a few nodes. One of them is given an edge-case title of "Array",
// because loading entities by an array of conditions is subject to PHP
// array-to-string conversion issues and we want to test those.
$node_1 = $this->drupalCreateNode(array('title' => 'Array'));
$node_2 = $this->drupalCreateNode(array('title' => 'Node 2'));
$node_3 = $this->drupalCreateNode(array('title' => 'Node 3'));
// Load all entities so that they are statically cached.
$all_nodes = entity_load('node', FALSE);
// Check that the first node can be loaded by title.
$nodes_loaded = entity_load('node', FALSE, array('title' => 'Array'));
$this->assertEqual(array_keys($nodes_loaded), array($node_1->nid));
// Check that the second and third nodes can be loaded by title using an
// array of conditions, and that the first node is not loaded from the
// cache along with them.
$nodes_loaded = entity_load('node', FALSE, array('title' => array('Node 2', 'Node 3')));
ksort($nodes_loaded);
$this->assertEqual(array_keys($nodes_loaded), array($node_2->nid, $node_3->nid));
$this->assertIdentical($nodes_loaded[$node_2->nid], $all_nodes[$node_2->nid], 'Loaded node 2 is identical to cached node.');
$this->assertIdentical($nodes_loaded[$node_3->nid], $all_nodes[$node_3->nid], 'Loaded node 3 is identical to cached node.');
}
}

View File

@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -952,7 +952,7 @@ class FileDirectoryTest extends FileTestCase {
$this->assertTrue(is_file(file_default_scheme() . '://.htaccess'), 'Successfully re-created the .htaccess file in the files directory.', 'File');
// Verify contents of .htaccess file.
$file = file_get_contents(file_default_scheme() . '://.htaccess');
$this->assertEqual($file, "SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006\nOptions None\nOptions +FollowSymLinks", 'The .htaccess file contains the proper content.', 'File');
$this->assertEqual($file, file_htaccess_lines(FALSE), 'The .htaccess file contains the proper content.', 'File');
}
/**
@@ -2388,7 +2388,7 @@ class FileDownloadTest extends FileTestCase {
$this->assertEqual($headers['x-foo'], 'Bar', 'Found header set by file_test module on private download.');
$this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.');
// Test that the file transfered correctly.
// Test that the file transferred correctly.
$this->assertEqual($contents, $this->content, 'Contents of the file are correct.');
// Deny access to all downloads via a -1 header.

View File

@@ -6,8 +6,8 @@ core = 7.x
files[] = file_test.module
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -82,6 +82,10 @@ class FormsTestCase extends DrupalWebTestCase {
$form_state['input'][$element] = $empty;
$form_state['input']['form_id'] = $form_id;
$form_state['method'] = 'post';
// The form token CSRF protection should not interfere with this test,
// so we bypass it by marking this test form as programmed.
$form_state['programmed'] = TRUE;
drupal_prepare_form($form_id, $form, $form_state);
drupal_process_form($form_id, $form, $form_state);
$errors = form_get_errors();
@@ -614,6 +618,18 @@ class FormValidationTestCase extends DrupalWebTestCase {
$this->drupalPost(NULL, array(), 'Save');
$this->assertNoFieldByName('name', 'Form element was hidden.');
$this->assertText('Name value: element_validate_access', 'Value for inaccessible form element exists.');
// Verify that #validate handlers don't run if the CSRF token is invalid.
$this->drupalLogin($this->drupalCreateUser());
$this->drupalGet('form-test/validate');
$edit = array(
'name' => 'validate',
'form_token' => 'invalid token'
);
$this->drupalPost(NULL, $edit, 'Save');
$this->assertNoFieldByName('name', '#value changed by #validate', 'Form element #value was not altered.');
$this->assertNoText('Name value: value changed by form_set_value() in #validate', 'Form element value in $form_state was not altered.');
$this->assertText('The form has become outdated. Copy any unsaved work in the form below');
}
/**
@@ -941,6 +957,10 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
$form_state['input'] = $edit;
$form_state['input']['form_id'] = $form_id;
// The form token CSRF protection should not interfere with this test,
// so we bypass it by marking this test form as programmed.
$form_state['programmed'] = TRUE;
drupal_prepare_form($form_id, $form, $form_state);
drupal_process_form($form_id, $form, $form_state);
@@ -1136,6 +1156,182 @@ class FormsFormStorageTestCase extends DrupalWebTestCase {
$this->assertText('State persisted.');
}
}
/**
* Verify that the form build-id remains the same when validation errors
* occur on a mutable form.
*/
function testMutableForm() {
// Request the form with 'cache' query parameter to enable form caching.
$this->drupalGet('form_test/form-storage', array('query' => array('cache' => 1)));
$buildIdFields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($buildIdFields), 1, 'One form build id field on the page');
$buildId = (string) $buildIdFields[0]['value'];
// Trigger validation error by submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Continue submit');
// Verify that the build-id did not change.
$this->assertFieldByName('form_build_id', $buildId, 'Build id remains the same when form validation fails');
}
/**
* Verifies that form build-id is regenerated when loading an immutable form
* from the cache.
*/
function testImmutableForm() {
// Request the form with 'cache' query parameter to enable form caching.
$this->drupalGet('form_test/form-storage', array('query' => array('cache' => 1, 'immutable' => 1)));
$buildIdFields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($buildIdFields), 1, 'One form build id field on the page');
$buildId = (string) $buildIdFields[0]['value'];
// Trigger validation error by submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Continue submit');
// Verify that the build-id did change.
$this->assertNoFieldByName('form_build_id', $buildId, 'Build id changes when form validation fails');
// Retrieve the new build-id.
$buildIdFields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($buildIdFields), 1, 'One form build id field on the page');
$buildId = (string) $buildIdFields[0]['value'];
// Trigger validation error by again submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Continue submit');
// Verify that the build-id does not change the second time.
$this->assertFieldByName('form_build_id', $buildId, 'Build id remains the same when form validation fails subsequently');
}
/**
* Verify that existing contrib code cannot overwrite immutable form state.
*/
public function testImmutableFormLegacyProtection() {
$this->drupalGet('form_test/form-storage', array('query' => array('cache' => 1, 'immutable' => 1)));
$build_id_fields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($build_id_fields), 1, 'One form build id field on the page');
$build_id = (string) $build_id_fields[0]['value'];
// Try to poison the form cache.
$original = $this->drupalGetAJAX('form_test/form-storage-legacy/' . $build_id);
$this->assertEqual($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded');
$this->assertNotEqual($original['form']['#build_id'], $build_id, 'New build_id was generated');
// Assert that a watchdog message was logged by form_set_cache.
$status = (bool) db_query_range('SELECT 1 FROM {watchdog} WHERE message = :message', 0, 1, array(':message' => 'Form build-id mismatch detected while attempting to store a form in the cache.'));
$this->assert($status, 'A watchdog message was logged by form_set_cache');
// Ensure that the form state was not poisoned by the preceeding call.
$original = $this->drupalGetAJAX('form_test/form-storage-legacy/' . $build_id);
$this->assertEqual($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded');
$this->assertNotEqual($original['form']['#build_id'], $build_id, 'New build_id was generated');
$this->assert(empty($original['form']['#poisoned']), 'Original form structure was preserved');
$this->assert(empty($original['form_state']['poisoned']), 'Original form state was preserved');
}
}
/**
* Test the form storage when page caching for anonymous users is turned on.
*/
class FormsFormStoragePageCacheTestCase extends DrupalWebTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'Forms using form storage on cached pages',
'description' => 'Tests a form using form storage and makes sure validation and caching works when page caching for anonymous users is turned on.',
'group' => 'Form API',
);
}
public function setUp() {
parent::setUp('form_test');
variable_set('cache', TRUE);
}
/**
* Return the build id of the current form.
*/
protected function getFormBuildId() {
$build_id_fields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($build_id_fields), 1, 'One form build id field on the page');
return (string) $build_id_fields[0]['value'];
}
/**
* Build-id is regenerated when validating cached form.
*/
public function testValidateFormStorageOnCachedPage() {
$this->drupalGet('form_test/form-storage-page-cache');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.');
$this->assertText('No old build id', 'No old build id on the page');
$build_id_initial = $this->getFormBuildId();
// Trigger validation error by submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Save');
$this->assertText($build_id_initial, 'Old build id on the page');
$build_id_first_validation = $this->getFormBuildId();
$this->assertNotEqual($build_id_initial, $build_id_first_validation, 'Build id changes when form validation fails');
// Trigger validation error by again submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Save');
$this->assertText('No old build id', 'No old build id on the page');
$build_id_second_validation = $this->getFormBuildId();
$this->assertEqual($build_id_first_validation, $build_id_second_validation, 'Build id remains the same when form validation fails subsequently');
// Repeat the test sequence but this time with a page loaded from the cache.
$this->drupalGet('form_test/form-storage-page-cache');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.');
$this->assertText('No old build id', 'No old build id on the page');
$build_id_from_cache_initial = $this->getFormBuildId();
$this->assertEqual($build_id_initial, $build_id_from_cache_initial, 'Build id is the same as on the first request');
// Trigger validation error by submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Save');
$this->assertText($build_id_initial, 'Old build id is initial build id');
$build_id_from_cache_first_validation = $this->getFormBuildId();
$this->assertNotEqual($build_id_initial, $build_id_from_cache_first_validation, 'Build id changes when form validation fails');
$this->assertNotEqual($build_id_first_validation, $build_id_from_cache_first_validation, 'Build id from first user is not reused');
// Trigger validation error by again submitting an empty title.
$edit = array('title' => '');
$this->drupalPost(NULL, $edit, 'Save');
$this->assertText('No old build id', 'No old build id on the page');
$build_id_from_cache_second_validation = $this->getFormBuildId();
$this->assertEqual($build_id_from_cache_first_validation, $build_id_from_cache_second_validation, 'Build id remains the same when form validation fails subsequently');
}
/**
* Build-id is regenerated when rebuilding cached form.
*/
public function testRebuildFormStorageOnCachedPage() {
$this->drupalGet('form_test/form-storage-page-cache');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.');
$this->assertText('No old build id', 'No old build id on the page');
$build_id_initial = $this->getFormBuildId();
// Trigger rebuild, should regenerate build id.
$edit = array('title' => 'something');
$this->drupalPost(NULL, $edit, 'Rebuild');
$this->assertText($build_id_initial, 'Initial build id as old build id on the page');
$build_id_first_rebuild = $this->getFormBuildId();
$this->assertNotEqual($build_id_initial, $build_id_first_rebuild, 'Build id changes on first rebuild.');
// Trigger subsequent rebuild, should regenerate the build id again.
$edit = array('title' => 'something');
$this->drupalPost(NULL, $edit, 'Rebuild');
$this->assertText($build_id_first_rebuild, 'First build id as old build id on the page');
$build_id_second_rebuild = $this->getFormBuildId();
$this->assertNotEqual($build_id_first_rebuild, $build_id_second_rebuild, 'Build id changes on second rebuild.');
}
}
/**
@@ -1466,6 +1662,16 @@ class FormsProgrammaticTestCase extends DrupalWebTestCase {
$this->submitForm(array('textfield' => 'dummy value', 'checkboxes' => array(1 => NULL, 2 => 2)), TRUE);
$this->submitForm(array('textfield' => 'dummy value', 'checkboxes' => array(1 => NULL, 2 => NULL)), TRUE);
// Test that a programmatic form submission can successfully submit values
// even for fields where the #access property is FALSE.
$this->submitForm(array('textfield' => 'dummy value', 'textfield_no_access' => 'test value'), TRUE);
// Test that #access is respected for programmatic form submissions when
// requested to do so.
$submitted_values = array('textfield' => 'dummy value', 'textfield_no_access' => 'test value');
$expected_values = array('textfield' => 'dummy value', 'textfield_no_access' => 'default value');
$form_state = array('programmed_bypass_access_check' => FALSE);
$this->submitForm($submitted_values, TRUE, $expected_values, $form_state);
// Test that a programmatic form submission can correctly click a button
// that limits validation errors based on user input. Since we do not
// submit any values for "textfield" here and the textfield is required, we
@@ -1488,10 +1694,18 @@ class FormsProgrammaticTestCase extends DrupalWebTestCase {
* @param $valid_input
* A boolean indicating whether or not the form submission is expected to
* be valid.
* @param $expected_values
* (Optional) An array of field values that are expected to be stored by
* the form submit handler. If not set, the submitted $values are assumed
* to also be the expected stored values.
* @param $form_state
* (Optional) A keyed array containing the state of the form, to be sent in
* the call to drupal_form_submit(). The $values parameter is added to
* $form_state['values'] by default, if it is not already set.
*/
private function submitForm($values, $valid_input) {
private function submitForm($values, $valid_input, $expected_values = NULL, $form_state = array()) {
// Programmatically submit the given values.
$form_state = array('values' => $values);
$form_state += array('values' => $values);
drupal_form_submit('form_test_programmatic_form', $form_state);
// Check that the form returns an error when expected, and vice versa.
@@ -1508,7 +1722,10 @@ class FormsProgrammaticTestCase extends DrupalWebTestCase {
// By fetching the values from $form_state['storage'] we ensure that the
// submission handler was properly executed.
$stored_values = $form_state['storage']['programmatic_form_submit'];
foreach ($values as $key => $value) {
if (!isset($expected_values)) {
$expected_values = $values;
}
foreach ($expected_values as $key => $value) {
$this->assertTrue(isset($stored_values[$key]) && $stored_values[$key] == $value, format_string('Submission handler correctly executed: %stored_key is %stored_value', array('%stored_key' => $key, '%stored_value' => print_r($value, TRUE))));
}
}

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -90,6 +90,21 @@ function form_test_menu() {
'type' => MENU_CALLBACK,
);
$items['form_test/form-storage-legacy'] = array(
'title' => 'Emulate legacy AHAH-style ajax callback',
'page callback' => 'form_test_storage_legacy_handler',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['form_test/form-storage-page-cache'] = array(
'title' => 'Form storage with page cache test',
'page callback' => 'drupal_get_form',
'page arguments' => array('form_test_storage_page_cache_form'),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['form_test/wrapper-callback'] = array(
'title' => 'Form wrapper callback test',
'page callback' => 'form_test_wrapper_callback',
@@ -746,9 +761,36 @@ function form_test_storage_form($form, &$form_state) {
$form_state['cache'] = TRUE;
}
if (isset($_REQUEST['immutable'])) {
$form_state['build_info']['immutable'] = TRUE;
}
return $form;
}
/**
* Emulate legacy AHAH-style ajax callback.
*
* Drupal 6 AHAH callbacks used to operate directly on forms retrieved using
* form_get_cache and stored using form_set_cache after manipulation. This
* callback helps testing whether form_set_cache prevents resaving of immutable
* forms.
*/
function form_test_storage_legacy_handler($form_build_id) {
$form_state = array();
$form = form_get_cache($form_build_id, $form_state);
drupal_json_output(array(
'form' => $form,
'form_state' => $form_state,
));
$form['#poisoned'] = TRUE;
$form_state['poisoned'] = TRUE;
form_set_cache($form_build_id, $form, $form_state);
}
/**
* Form element validation handler for 'value' element in form_test_storage_form().
*
@@ -785,6 +827,56 @@ function form_test_storage_form_submit($form, &$form_state) {
$form_state['redirect'] = 'node';
}
/**
* A simple form for testing form storage when page caching is enabled.
*/
function form_test_storage_page_cache_form($form, &$form_state) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => 'Title',
'#required' => TRUE,
);
$form['test_build_id_old'] = array(
'#type' => 'item',
'#title' => 'Old build id',
'#markup' => 'No old build id',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
$form['rebuild'] = array(
'#type' => 'submit',
'#value' => 'Rebuild',
'#submit' => array('form_test_storage_page_cache_rebuild'),
);
$form['#after_build'] = array('form_test_storage_page_cache_old_build_id');
$form_state['cache'] = TRUE;
return $form;
}
/**
* Form element #after_build callback: output the old form build-id.
*/
function form_test_storage_page_cache_old_build_id($form) {
if (isset($form['#build_id_old'])) {
$form['test_build_id_old']['#markup'] = check_plain($form['#build_id_old']);
}
return $form;
}
/**
* Form submit callback: Rebuild the form and continue.
*/
function form_test_storage_page_cache_rebuild($form, &$form_state) {
$form_state['rebuild'] = TRUE;
}
/**
* A form for testing form labels and required marks.
*/
@@ -1548,6 +1640,15 @@ function form_test_programmatic_form($form, &$form_state) {
'#default_value' => array(1, 2),
);
// This is used to test that programmatic form submissions can bypass #access
// restrictions.
$form['textfield_no_access'] = array(
'#type' => 'textfield',
'#title' => 'Textfield no access',
'#default_value' => 'default value',
'#access' => FALSE,
);
$form['field_to_validate'] = array(
'#type' => 'radios',
'#title' => 'Field to validate (in the case of limited validation)',

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -267,6 +267,31 @@ class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
);
}
/**
* Tests that drupal_wrap_mail() removes trailing whitespace before newlines.
*/
function testDrupalHtmltoTextRemoveTrailingWhitespace() {
$text = "Hi there! \nHerp Derp";
$mail_lines = explode("\n", drupal_wrap_mail($text));
$this->assertNotEqual(" ", substr($mail_lines[0], -1), 'Trailing whitespace removed.');
}
/**
* Tests drupal_wrap_mail() retains whitespace from Usenet style signatures.
*
* RFC 3676 says, "This is a special case; an (optionally quoted or quoted and
* stuffed) line consisting of DASH DASH SP is neither fixed nor flowed."
*/
function testDrupalHtmltoTextUsenetSignature() {
$text = "Hi there!\n-- \nHerp Derp";
$mail_lines = explode("\n", drupal_wrap_mail($text));
$this->assertEqual("-- ", $mail_lines[1], 'Trailing whitespace not removed for dash-dash-space signatures.');
$text = "Hi there!\n-- \nHerp Derp";
$mail_lines = explode("\n", drupal_wrap_mail($text));
$this->assertEqual("--", $mail_lines[1], 'Trailing whitespace removed for incorrect dash-dash-space signatures.');
}
/**
* Test that whitespace is collapsed.
*/

View File

@@ -1025,8 +1025,8 @@ class MenuTreeOutputTestCase extends DrupalWebTestCase {
$output = menu_tree_output($this->tree_data);
// Validate that the - in main-menu is changed into an underscore
$this->assertEqual( $output['1']['#theme'], 'menu_link__main_menu', 'Hyphen is changed to a dash on menu_link');
$this->assertEqual( $output['#theme_wrappers'][0], 'menu_tree__main_menu', 'Hyphen is changed to a dash on menu_tree wrapper');
$this->assertEqual($output['1']['#theme'], 'menu_link__main_menu', 'Hyphen is changed to an underscore on menu_link');
$this->assertEqual($output['#theme_wrappers'][0], 'menu_tree__main_menu', 'Hyphen is changed to an underscore on menu_tree wrapper');
// Looking for child items in the data
$this->assertEqual( $output['1']['#below']['2']['#href'], 'a/b', 'Checking the href on a child item');
$this->assertTrue( in_array('active-trail',$output['1']['#below']['2']['#attributes']['class']) , 'Checking the active trail class');

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ core = 7.x
hidden = TRUE
package = Testing
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -7,8 +7,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -68,8 +68,7 @@ class SessionTestCase extends DrupalWebTestCase {
}
/**
* Test data persistence via the session_test module callbacks. Also tests
* drupal_session_count() since session data is already generated here.
* Test data persistence via the session_test module callbacks.
*/
function testDataPersistence() {
$user = $this->drupalCreateUser(array('access content'));

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = _missing_dependency
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = system_incompatible_core_version_test
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 5.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -7,8 +7,8 @@ hidden = TRUE
; system_incompatible_module_version_test declares version 1.0
dependencies[] = system_incompatible_module_version_test (>2.0)
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = 1.0
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ core = 7.x
files[] = system_test.module
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -114,8 +114,23 @@ function system_test_sleep($seconds) {
}
function system_test_basic_auth_page() {
$output = t('$_SERVER[\'PHP_AUTH_USER\'] is @username.', array('@username' => $_SERVER['PHP_AUTH_USER']));
$output .= t('$_SERVER[\'PHP_AUTH_PW\'] is @password.', array('@password' => $_SERVER['PHP_AUTH_PW']));
// The Authorization HTTP header is forwarded via Drupal's .htaccess file even
// for PHP CGI SAPIs.
if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
$authorization_header = $_SERVER['HTTP_AUTHORIZATION'];
}
// If using CGI on Apache with mod_rewrite, the forwarded HTTP header appears
// in the redirected HTTP headers. See
// https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/ServerBag.php#L61
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
$authorization_header = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
}
// Resemble PHP_AUTH_USER and PHP_AUTH_PW for a Basic authentication from
// the HTTP_AUTHORIZATION header. See
// http://www.php.net/manual/features.http-auth.php
list($user, $pw) = explode(':', base64_decode(substr($authorization_header, 6)));
$output = t('Username is @username.', array('@username' => $user));
$output .= t('Password is @password.', array('@password' => $pw));
return $output;
}

View File

@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = taxonomy
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ hidden = TRUE
settings[basetheme_only] = base theme value
settings[subtheme_override] = base theme value
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -6,8 +6,8 @@ hidden = TRUE
settings[subtheme_override] = subtheme value
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -17,8 +17,8 @@ stylesheets[all][] = system.base.css
settings[theme_test_setting] = default value
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -56,6 +56,11 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
$this->assertFalse(db_table_exists('taxonomy_vocabulary_node_type'), 'taxonomy_vocabulary_node_type has been removed.');
$this->assertFalse(db_table_exists('taxonomy_term_node'), 'taxonomy_term_node has been removed.');
// Check that taxonomy_index has not stored nids of unpublished nodes.
$nids = db_query('SELECT nid from {node} WHERE status = :status', array(':status' => NODE_NOT_PUBLISHED))->fetchCol();
$indexed_nids = db_query('SELECT DISTINCT nid from {taxonomy_index}')->fetchCol();
$this->assertFalse(array_intersect($nids, $indexed_nids), 'No unpublished nid present in taxonomy_index');
// Check that the node type 'page' has been associated to a taxonomy
// reference field for each vocabulary.
$voc_keys = array();

View File

@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"

View File

@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by drupal.org packaging script on 2013-08-08
version = "7.23"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.28"
project = "drupal"
datestamp = "1375928238"
datestamp = "1399522731"