updated drupal core to 7.51
This commit is contained in:
@@ -853,6 +853,13 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
*/
|
||||
protected $cookieFile = NULL;
|
||||
|
||||
/**
|
||||
* The cookies of the page currently loaded in the internal browser.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $cookies = array();
|
||||
|
||||
/**
|
||||
* Additional cURL options.
|
||||
*
|
||||
@@ -942,7 +949,6 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
protected function drupalCreateNode($settings = array()) {
|
||||
// Populate defaults array.
|
||||
$settings += array(
|
||||
'body' => array(LANGUAGE_NONE => array(array())),
|
||||
'title' => $this->randomName(8),
|
||||
'comment' => 2,
|
||||
'changed' => REQUEST_TIME,
|
||||
@@ -957,6 +963,12 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
'language' => LANGUAGE_NONE,
|
||||
);
|
||||
|
||||
// Add the body after the language is defined so that it may be set
|
||||
// properly.
|
||||
$settings += array(
|
||||
'body' => array($settings['language'] => array(array())),
|
||||
);
|
||||
|
||||
// Use the original node's created time for existing nodes.
|
||||
if (isset($settings['created']) && !isset($settings['date'])) {
|
||||
$settings['date'] = format_date($settings['created'], 'custom', 'Y-m-d H:i:s O');
|
||||
@@ -1693,8 +1705,10 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
$GLOBALS['conf']['language_default'] = $this->originalLanguageDefault;
|
||||
}
|
||||
|
||||
// Close the CURL handler.
|
||||
// Close the CURL handler and reset the cookies array so test classes
|
||||
// containing multiple tests are not polluted.
|
||||
$this->curlClose();
|
||||
$this->cookies = array();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2760,7 +2774,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
$path = substr($path, $length);
|
||||
}
|
||||
// Ensure that we have an absolute path.
|
||||
if ($path[0] !== '/') {
|
||||
if (empty($path) || $path[0] !== '/') {
|
||||
$path = '/' . $path;
|
||||
}
|
||||
// Finally, prepend the $base_url.
|
||||
|
BIN
modules/simpletest/files/image-test-no-transparency.gif
Normal file
BIN
modules/simpletest/files/image-test-no-transparency.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 964 B |
@@ -57,8 +57,8 @@ files[] = tests/upgrade/update.trigger.test
|
||||
files[] = tests/upgrade/update.field.test
|
||||
files[] = tests/upgrade/update.user.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -374,7 +374,10 @@ function simpletest_test_get_all() {
|
||||
// If this test class requires a non-existing module, skip it.
|
||||
if (!empty($info['dependencies'])) {
|
||||
foreach ($info['dependencies'] as $module) {
|
||||
if (!drupal_get_filename('module', $module)) {
|
||||
// Pass FALSE as fourth argument so no error gets created for
|
||||
// the missing file.
|
||||
$found_module = drupal_get_filename('module', $module, NULL, FALSE);
|
||||
if (!$found_module) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
@@ -322,6 +322,14 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
|
||||
* Test internal testing framework browser.
|
||||
*/
|
||||
class SimpleTestBrowserTestCase extends DrupalWebTestCase {
|
||||
|
||||
/**
|
||||
* A flag indicating whether a cookie has been set in a test.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected static $cookieSet = FALSE;
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'SimpleTest browser',
|
||||
@@ -380,6 +388,46 @@ EOF;
|
||||
$urls = $this->xpath('//a[text()=:text]', array(':text' => 'A second "even more weird" link, in memory of George O\'Malley'));
|
||||
$this->assertEqual($urls[0]['href'], 'link2', 'Match with mixed single and double quotes.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that cookies set during a request are available for testing.
|
||||
*/
|
||||
public function testCookies() {
|
||||
// Check that the $this->cookies property is populated when a user logs in.
|
||||
$user = $this->drupalCreateUser();
|
||||
$edit = array('name' => $user->name, 'pass' => $user->pass_raw);
|
||||
$this->drupalPost('<front>', $edit, t('Log in'));
|
||||
$this->assertEqual(count($this->cookies), 1, 'A cookie is set when the user logs in.');
|
||||
|
||||
// Check that the name and value of the cookie match the request data.
|
||||
$cookie_header = $this->drupalGetHeader('set-cookie', TRUE);
|
||||
|
||||
// The name and value are located at the start of the string, separated by
|
||||
// an equals sign and ending in a semicolon.
|
||||
preg_match('/^([^=]+)=([^;]+)/', $cookie_header, $matches);
|
||||
$name = $matches[1];
|
||||
$value = $matches[2];
|
||||
|
||||
$this->assertTrue(array_key_exists($name, $this->cookies), 'The cookie name is correct.');
|
||||
$this->assertEqual($value, $this->cookies[$name]['value'], 'The cookie value is correct.');
|
||||
|
||||
// Set a flag indicating that a cookie has been set in this test.
|
||||
// @see SimpleTestBrowserTestCase::testCookieDoesNotBleed().
|
||||
self::$cookieSet = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the cookies from a previous test do not bleed into a new test.
|
||||
*
|
||||
* @see SimpleTestBrowserTestCase::testCookies().
|
||||
*/
|
||||
public function testCookieDoesNotBleed() {
|
||||
// In order for this test to be effective it should always run after the
|
||||
// testCookies() test.
|
||||
$this->assertTrue(self::$cookieSet, 'Tests have been executed in the expected order.');
|
||||
$this->assertEqual(count($this->cookies), 0, 'No cookies are present at the start of a new test.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SimpleTestMailCaptureTestCase extends DrupalWebTestCase {
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -70,6 +70,15 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase {
|
||||
'Proxy forwarding with trusted proxy got forwarded IP address.'
|
||||
);
|
||||
|
||||
// Proxy forwarding on and proxy address trusted and visiting from proxy.
|
||||
$_SERVER['REMOTE_ADDR'] = $this->proxy_ip;
|
||||
$_SERVER['HTTP_X_FORWARDED_FOR'] = $this->proxy_ip;
|
||||
drupal_static_reset('ip_address');
|
||||
$this->assertTrue(
|
||||
ip_address() == $this->proxy_ip,
|
||||
'Visiting from trusted proxy got proxy IP address.'
|
||||
);
|
||||
|
||||
// Multi-tier architecture with comma separated values in header.
|
||||
$_SERVER['REMOTE_ADDR'] = $this->proxy_ip;
|
||||
$_SERVER['HTTP_X_FORWARDED_FOR'] = implode(', ', array($this->untrusted_ip, $this->forwarded_ip, $this->proxy2_ip));
|
||||
@@ -191,7 +200,7 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
|
||||
$this->drupalGet('system-test/set-header', array('query' => array('name' => 'Foo', 'value' => 'bar')));
|
||||
$this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Caching was bypassed.');
|
||||
$this->assertTrue(strpos($this->drupalGetHeader('Vary'), 'Cookie') === FALSE, 'Vary: Cookie header was not sent.');
|
||||
$this->assertEqual($this->drupalGetHeader('Cache-Control'), 'no-cache, must-revalidate, post-check=0, pre-check=0', 'Cache-Control header was sent.');
|
||||
$this->assertEqual($this->drupalGetHeader('Cache-Control'), 'no-cache, must-revalidate', 'Cache-Control header was sent.');
|
||||
$this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', 'Expires header was sent.');
|
||||
$this->assertEqual($this->drupalGetHeader('Foo'), 'bar', 'Custom header was sent.');
|
||||
|
||||
@@ -379,12 +388,19 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Get filename test',
|
||||
'description' => 'Test that drupal_get_filename() works correctly when the file is not found in the database.',
|
||||
'name' => 'Get filename test (without the system table)',
|
||||
'description' => 'Test that drupal_get_filename() works correctly when the database is not available.',
|
||||
'group' => 'Bootstrap',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The last file-related error message triggered by the filename test.
|
||||
*
|
||||
* Used by BootstrapGetFilenameTestCase::testDrupalGetFilename().
|
||||
*/
|
||||
protected $getFilenameTestTriggeredError;
|
||||
|
||||
/**
|
||||
* Test that drupal_get_filename() works correctly when the file is not found in the database.
|
||||
*/
|
||||
@@ -414,6 +430,203 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
|
||||
// automatically check there for 'script' files, just as it does for (e.g.)
|
||||
// 'module' files in modules.
|
||||
$this->assertIdentical(drupal_get_filename('script', 'test'), 'scripts/test.script', t('Retrieve test script location.'));
|
||||
|
||||
// When searching for a module that does not exist, drupal_get_filename()
|
||||
// should return NULL and trigger an appropriate error message.
|
||||
$this->getFilenameTestTriggeredError = NULL;
|
||||
set_error_handler(array($this, 'fileNotFoundErrorHandler'));
|
||||
$non_existing_module = $this->randomName();
|
||||
$this->assertNull(drupal_get_filename('module', $non_existing_module), 'Searching for a module that does not exist returns NULL.');
|
||||
$this->assertTrue(strpos($this->getFilenameTestTriggeredError, format_string('The following module is missing from the file system: %name', array('%name' => $non_existing_module))) === 0, 'Searching for an item that does not exist triggers the correct error.');
|
||||
restore_error_handler();
|
||||
|
||||
// Check that the result is stored in the file system scan cache.
|
||||
$file_scans = _drupal_file_scan_cache();
|
||||
$this->assertIdentical($file_scans['module'][$non_existing_module], FALSE, 'Searching for a module that does not exist creates a record in the missing and moved files static variable.');
|
||||
|
||||
// Performing the search again in the same request still should not find
|
||||
// the file, but the error message should not be repeated (therefore we do
|
||||
// not override the error handler here).
|
||||
$this->assertNull(drupal_get_filename('module', $non_existing_module), 'Searching for a module that does not exist returns NULL during the second search.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips handling of "file not found" errors.
|
||||
*/
|
||||
public function fileNotFoundErrorHandler($error_level, $message, $filename, $line, $context) {
|
||||
// Skip error handling if this is a "file not found" error.
|
||||
if (strpos($message, 'is missing from the file system:') !== FALSE || strpos($message, 'has moved within the file system:') !== FALSE) {
|
||||
$this->getFilenameTestTriggeredError = $message;
|
||||
return;
|
||||
}
|
||||
_drupal_error_handler($error_level, $message, $filename, $line, $context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test drupal_get_filename() in the context of a full Drupal installation.
|
||||
*/
|
||||
class BootstrapGetFilenameWebTestCase extends DrupalWebTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Get filename test (full installation)',
|
||||
'description' => 'Test that drupal_get_filename() works correctly in the context of a full Drupal installation.',
|
||||
'group' => 'Bootstrap',
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('system_test');
|
||||
}
|
||||
|
||||
/**
|
||||
* The last file-related error message triggered by the filename test.
|
||||
*
|
||||
* Used by BootstrapGetFilenameWebTestCase::testDrupalGetFilename().
|
||||
*/
|
||||
protected $getFilenameTestTriggeredError;
|
||||
|
||||
/**
|
||||
* Test that drupal_get_filename() works correctly with a full Drupal site.
|
||||
*/
|
||||
function testDrupalGetFilename() {
|
||||
// Search for a module that exists in the file system and the {system}
|
||||
// table and make sure that it is found.
|
||||
$this->assertIdentical(drupal_get_filename('module', 'node'), 'modules/node/node.module', 'Module found at expected location.');
|
||||
|
||||
// Search for a module that does not exist in either the file system or the
|
||||
// {system} table. Make sure that an appropriate error is triggered and
|
||||
// that the module winds up in the static and persistent cache.
|
||||
$this->getFilenameTestTriggeredError = NULL;
|
||||
set_error_handler(array($this, 'fileNotFoundErrorHandler'));
|
||||
$non_existing_module = $this->randomName();
|
||||
$this->assertNull(drupal_get_filename('module', $non_existing_module), 'Searching for a module that does not exist returns NULL.');
|
||||
$this->assertTrue(strpos($this->getFilenameTestTriggeredError, format_string('The following module is missing from the file system: %name', array('%name' => $non_existing_module))) === 0, 'Searching for a module that does not exist triggers the correct error.');
|
||||
restore_error_handler();
|
||||
$file_scans = _drupal_file_scan_cache();
|
||||
$this->assertIdentical($file_scans['module'][$non_existing_module], FALSE, 'Searching for a module that does not exist creates a record in the missing and moved files static variable.');
|
||||
drupal_file_scan_write_cache();
|
||||
$cache = cache_get('_drupal_file_scan_cache', 'cache_bootstrap');
|
||||
$this->assertIdentical($cache->data['module'][$non_existing_module], FALSE, 'Searching for a module that does not exist creates a record in the missing and moved files persistent cache.');
|
||||
|
||||
// Simulate moving a module to a location that does not match the location
|
||||
// in the {system} table and perform similar tests as above.
|
||||
db_update('system')
|
||||
->fields(array('filename' => 'modules/simpletest/tests/fake_location/module_test.module'))
|
||||
->condition('name', 'module_test')
|
||||
->condition('type', 'module')
|
||||
->execute();
|
||||
$this->getFilenameTestTriggeredError = NULL;
|
||||
set_error_handler(array($this, 'fileNotFoundErrorHandler'));
|
||||
$this->assertIdentical(drupal_get_filename('module', 'module_test'), 'modules/simpletest/tests/module_test.module', 'Searching for a module that has moved finds the module at its new location.');
|
||||
$this->assertTrue(strpos($this->getFilenameTestTriggeredError, format_string('The following module has moved within the file system: %name', array('%name' => 'module_test'))) === 0, 'Searching for a module that has moved triggers the correct error.');
|
||||
restore_error_handler();
|
||||
$file_scans = _drupal_file_scan_cache();
|
||||
$this->assertIdentical($file_scans['module']['module_test'], 'modules/simpletest/tests/module_test.module', 'Searching for a module that has moved creates a record in the missing and moved files static variable.');
|
||||
drupal_file_scan_write_cache();
|
||||
$cache = cache_get('_drupal_file_scan_cache', 'cache_bootstrap');
|
||||
$this->assertIdentical($cache->data['module']['module_test'], 'modules/simpletest/tests/module_test.module', 'Searching for a module that has moved creates a record in the missing and moved files persistent cache.');
|
||||
|
||||
// Simulate a module that exists in the {system} table but does not exist
|
||||
// in the file system and perform similar tests as above.
|
||||
$non_existing_module = $this->randomName();
|
||||
db_update('system')
|
||||
->fields(array('name' => $non_existing_module))
|
||||
->condition('name', 'module_test')
|
||||
->condition('type', 'module')
|
||||
->execute();
|
||||
$this->getFilenameTestTriggeredError = NULL;
|
||||
set_error_handler(array($this, 'fileNotFoundErrorHandler'));
|
||||
$this->assertNull(drupal_get_filename('module', $non_existing_module), 'Searching for a module that exists in the system table but not in the file system returns NULL.');
|
||||
$this->assertTrue(strpos($this->getFilenameTestTriggeredError, format_string('The following module is missing from the file system: %name', array('%name' => $non_existing_module))) === 0, 'Searching for a module that exists in the system table but not in the file system triggers the correct error.');
|
||||
restore_error_handler();
|
||||
$file_scans = _drupal_file_scan_cache();
|
||||
$this->assertIdentical($file_scans['module'][$non_existing_module], FALSE, 'Searching for a module that exists in the system table but not in the file system creates a record in the missing and moved files static variable.');
|
||||
drupal_file_scan_write_cache();
|
||||
$cache = cache_get('_drupal_file_scan_cache', 'cache_bootstrap');
|
||||
$this->assertIdentical($cache->data['module'][$non_existing_module], FALSE, 'Searching for a module that exists in the system table but not in the file system creates a record in the missing and moved files persistent cache.');
|
||||
|
||||
// Simulate a module that exists in the file system but not in the {system}
|
||||
// table and perform similar tests as above.
|
||||
db_delete('system')
|
||||
->condition('name', 'common_test')
|
||||
->condition('type', 'module')
|
||||
->execute();
|
||||
system_list_reset();
|
||||
$this->getFilenameTestTriggeredError = NULL;
|
||||
set_error_handler(array($this, 'fileNotFoundErrorHandler'));
|
||||
$this->assertIdentical(drupal_get_filename('module', 'common_test'), 'modules/simpletest/tests/common_test.module', 'Searching for a module that does not exist in the system table finds the module at its actual location.');
|
||||
$this->assertTrue(strpos($this->getFilenameTestTriggeredError, format_string('The following module has moved within the file system: %name', array('%name' => 'common_test'))) === 0, 'Searching for a module that does not exist in the system table triggers the correct error.');
|
||||
restore_error_handler();
|
||||
$file_scans = _drupal_file_scan_cache();
|
||||
$this->assertIdentical($file_scans['module']['common_test'], 'modules/simpletest/tests/common_test.module', 'Searching for a module that does not exist in the system table creates a record in the missing and moved files static variable.');
|
||||
drupal_file_scan_write_cache();
|
||||
$cache = cache_get('_drupal_file_scan_cache', 'cache_bootstrap');
|
||||
$this->assertIdentical($cache->data['module']['common_test'], 'modules/simpletest/tests/common_test.module', 'Searching for a module that does not exist in the system table creates a record in the missing and moved files persistent cache.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips handling of "file not found" errors.
|
||||
*/
|
||||
public function fileNotFoundErrorHandler($error_level, $message, $filename, $line, $context) {
|
||||
// Skip error handling if this is a "file not found" error.
|
||||
if (strpos($message, 'is missing from the file system:') !== FALSE || strpos($message, 'has moved within the file system:') !== FALSE) {
|
||||
$this->getFilenameTestTriggeredError = $message;
|
||||
return;
|
||||
}
|
||||
_drupal_error_handler($error_level, $message, $filename, $line, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that watchdog messages about missing files are correctly recorded.
|
||||
*/
|
||||
public function testWatchdog() {
|
||||
// Search for a module that does not exist in either the file system or the
|
||||
// {system} table. Make sure that an appropriate warning is recorded in the
|
||||
// logs.
|
||||
$non_existing_module = $this->randomName();
|
||||
$query_parameters = array(
|
||||
':type' => 'php',
|
||||
':severity' => WATCHDOG_WARNING,
|
||||
);
|
||||
$this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchField(), 0, 'No warning message appears in the logs before searching for a module that does not exist.');
|
||||
// Trigger the drupal_get_filename() call. This must be done via a request
|
||||
// to a separate URL since the watchdog() will happen in a shutdown
|
||||
// function, and so that SimpleTest can be told to ignore (and not fail as
|
||||
// a result of) the expected PHP warnings generated during this process.
|
||||
variable_set('system_test_drupal_get_filename_test_module_name', $non_existing_module);
|
||||
$this->drupalGet('system-test/drupal-get-filename');
|
||||
$message_variables = db_query('SELECT variables FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchCol();
|
||||
$this->assertEqual(count($message_variables), 1, 'A single warning message appears in the logs after searching for a module that does not exist.');
|
||||
$variables = reset($message_variables);
|
||||
$variables = unserialize($variables);
|
||||
$this->assertTrue(isset($variables['!message']) && strpos($variables['!message'], format_string('The following module is missing from the file system: %name', array('%name' => $non_existing_module))) !== FALSE, 'The warning message that appears in the logs after searching for a module that does not exist contains the expected text.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that drupal_get_filename() does not break recursive rebuilds.
|
||||
*/
|
||||
public function testRecursiveRebuilds() {
|
||||
// Ensure that the drupal_get_filename() call due to a missing module does
|
||||
// not break the data returned by an attempted recursive rebuild. The code
|
||||
// path which is tested is as follows:
|
||||
// - Call drupal_get_schema().
|
||||
// - Within a hook_schema() implementation, trigger a drupal_get_filename()
|
||||
// search for a nonexistent module.
|
||||
// - In the watchdog() call that results from that, trigger
|
||||
// drupal_get_schema() again.
|
||||
// Without some kind of recursion protection, this could cause the second
|
||||
// drupal_get_schema() call to return incomplete results. This test ensures
|
||||
// that does not happen.
|
||||
$non_existing_module = $this->randomName();
|
||||
variable_set('system_test_drupal_get_filename_test_module_name', $non_existing_module);
|
||||
$this->drupalGet('system-test/drupal-get-filename-with-schema-rebuild');
|
||||
$original_drupal_get_schema_tables = variable_get('system_test_drupal_get_filename_with_schema_rebuild_original_tables');
|
||||
$final_drupal_get_schema_tables = variable_get('system_test_drupal_get_filename_with_schema_rebuild_final_tables');
|
||||
$this->assertTrue(!empty($original_drupal_get_schema_tables));
|
||||
$this->assertTrue(!empty($final_drupal_get_schema_tables));
|
||||
$this->assertEqual($original_drupal_get_schema_tables, $final_drupal_get_schema_tables);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -947,6 +947,31 @@ class DrupalHTMLIdentifierTestCase extends DrupalUnitTestCase {
|
||||
|
||||
// Verify that invalid characters (including non-breaking space) are stripped from the identifier.
|
||||
$this->assertIdentical(drupal_clean_css_identifier('invalid !"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ identifier', array()), 'invalididentifier', 'Strip invalid characters.');
|
||||
|
||||
// Verify that double underscores are replaced in the identifier by default.
|
||||
$identifier = 'css__identifier__with__double__underscores';
|
||||
$expected = 'css--identifier--with--double--underscores';
|
||||
$this->assertIdentical(drupal_clean_css_identifier($identifier), $expected, 'Verify double underscores are replaced with double hyphens by default.');
|
||||
|
||||
// Verify that double underscores are preserved in the identifier if the
|
||||
// variable allow_css_double_underscores is set to TRUE.
|
||||
$this->setAllowCSSDoubleUnderscores(TRUE);
|
||||
$this->assertIdentical(drupal_clean_css_identifier($identifier), $identifier, 'Verify double underscores are preserved if the allow_css_double_underscores set to TRUE.');
|
||||
|
||||
// To avoid affecting other test cases, set the variable
|
||||
// allow_css_double_underscores to FALSE which is the default value.
|
||||
$this->setAllowCSSDoubleUnderscores(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the variable allow_css_double_underscores and reset the cache.
|
||||
*
|
||||
* @param $value bool
|
||||
* A new value to be set to allow_css_double_underscores.
|
||||
*/
|
||||
function setAllowCSSDoubleUnderscores($value) {
|
||||
$GLOBALS['conf']['allow_css_double_underscores'] = $value;
|
||||
drupal_static_reset('drupal_clean_css_identifier:allow_css_double_underscores');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1254,7 +1279,7 @@ class DrupalSetContentTestCase extends DrupalWebTestCase {
|
||||
function testRegions() {
|
||||
global $theme_key;
|
||||
|
||||
$block_regions = array_keys(system_region_list($theme_key));
|
||||
$block_regions = system_region_list($theme_key, REGIONS_ALL, FALSE);
|
||||
$delimiter = $this->randomName(32);
|
||||
$values = array();
|
||||
// Set some random content for each region available.
|
||||
|
@@ -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 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -7,8 +7,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = entity_cache_test_dependency
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = file_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -994,6 +994,26 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
|
||||
$this->assertTrue(isset($errors['tableselect']), 'Option checker disallows invalid values for radio buttons.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test presence of ajax functionality
|
||||
*/
|
||||
function testAjax() {
|
||||
$rows = array('row1', 'row2', 'row3');
|
||||
// Test checkboxes (#multiple == TRUE).
|
||||
foreach ($rows as $row) {
|
||||
$element = 'tableselect[' . $row . ']';
|
||||
$edit = array($element => TRUE);
|
||||
$result = $this->drupalPostAJAX('form_test/tableselect/multiple-true', $edit, $element);
|
||||
$this->assertFalse(empty($result), t('Ajax triggers on checkbox for @row.', array('@row' => $row)));
|
||||
}
|
||||
// Test radios (#multiple == FALSE).
|
||||
$element = 'tableselect';
|
||||
foreach ($rows as $row) {
|
||||
$edit = array($element => $row);
|
||||
$result = $this->drupalPostAjax('form_test/tableselect/multiple-false', $edit, $element);
|
||||
$this->assertFalse(empty($result), t('Ajax triggers on radio for @row.', array('@row' => $row)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for the option check test to submit a form while collecting errors.
|
||||
@@ -2099,3 +2119,36 @@ class HTMLIdTestCase extends DrupalWebTestCase {
|
||||
$this->assertNoDuplicateIds('There are no duplicate IDs');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for form textarea.
|
||||
*/
|
||||
class FormTextareaTestCase extends DrupalUnitTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Form textarea',
|
||||
'description' => 'Tests form textarea related functions.',
|
||||
'group' => 'Form API',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that textarea value is properly set.
|
||||
*/
|
||||
public function testValueCallback() {
|
||||
$element = array();
|
||||
$form_state = array();
|
||||
$test_cases = array(
|
||||
array(NULL, FALSE),
|
||||
array(NULL, NULL),
|
||||
array('', array('test')),
|
||||
array('test', 'test'),
|
||||
array('123', 123),
|
||||
);
|
||||
foreach ($test_cases as $test_case) {
|
||||
list($expected, $input) = $test_case;
|
||||
$this->assertIdentical($expected, form_type_textarea_value($element, $input, $form_state));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -589,11 +589,17 @@ function _form_test_tableselect_form_builder($form, $form_state, $element_proper
|
||||
$form['tableselect'] = $element_properties;
|
||||
|
||||
$form['tableselect'] += array(
|
||||
'#prefix' => '<div id="tableselect-wrapper">',
|
||||
'#suffix' => '</div>',
|
||||
'#type' => 'tableselect',
|
||||
'#header' => $header,
|
||||
'#options' => $options,
|
||||
'#multiple' => FALSE,
|
||||
'#empty' => t('Empty text.'),
|
||||
'#ajax' => array(
|
||||
'callback' => '_form_test_tableselect_ajax_callback',
|
||||
'wrapper' => 'tableselect-wrapper',
|
||||
),
|
||||
);
|
||||
|
||||
$form['submit'] = array(
|
||||
@@ -697,6 +703,13 @@ function _form_test_vertical_tabs_form($form, &$form_state) {
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax callback that returns the form element.
|
||||
*/
|
||||
function _form_test_tableselect_ajax_callback($form, &$form_state) {
|
||||
return $form['tableselect'];
|
||||
}
|
||||
|
||||
/**
|
||||
* A multistep form for testing the form storage.
|
||||
*
|
||||
|
@@ -207,9 +207,11 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
protected $green = array(0, 255, 0, 0);
|
||||
protected $blue = array(0, 0, 255, 0);
|
||||
protected $yellow = array(255, 255, 0, 0);
|
||||
protected $fuchsia = array(255, 0, 255, 0); // Used as background colors.
|
||||
protected $transparent = array(0, 0, 0, 127);
|
||||
protected $white = array(255, 255, 255, 0);
|
||||
protected $transparent = array(0, 0, 0, 127);
|
||||
// Used as rotate background colors.
|
||||
protected $fuchsia = array(255, 0, 255, 0);
|
||||
protected $rotate_transparent = array(255, 255, 255, 127);
|
||||
|
||||
protected $width = 40;
|
||||
protected $height = 20;
|
||||
@@ -275,6 +277,7 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
$files = array(
|
||||
'image-test.png',
|
||||
'image-test.gif',
|
||||
'image-test-no-transparency.gif',
|
||||
'image-test.jpg',
|
||||
);
|
||||
|
||||
@@ -334,13 +337,6 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
// Systems using non-bundled GD2 don't have imagerotate. Test if available.
|
||||
if (function_exists('imagerotate')) {
|
||||
$operations += array(
|
||||
'rotate_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5, 0xFF00FF), // Fuchsia background.
|
||||
'width' => 42,
|
||||
'height' => 24,
|
||||
'corners' => array_fill(0, 4, $this->fuchsia),
|
||||
),
|
||||
'rotate_90' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(90, 0xFF00FF), // Fuchsia background.
|
||||
@@ -348,13 +344,6 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
'height' => 40,
|
||||
'corners' => array($this->fuchsia, $this->red, $this->green, $this->blue),
|
||||
),
|
||||
'rotate_transparent_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5),
|
||||
'width' => 42,
|
||||
'height' => 24,
|
||||
'corners' => array_fill(0, 4, $this->transparent),
|
||||
),
|
||||
'rotate_transparent_90' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(90),
|
||||
@@ -363,6 +352,49 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
'corners' => array($this->transparent, $this->red, $this->green, $this->blue),
|
||||
),
|
||||
);
|
||||
// As of PHP version 5.5, GD uses a different algorithm to rotate images
|
||||
// than version 5.4 and below, resulting in different dimensions.
|
||||
// See https://bugs.php.net/bug.php?id=65148.
|
||||
// For the 40x20 test images, the dimensions resulting from rotation will
|
||||
// be 1 pixel smaller in both width and height in PHP 5.5 and above.
|
||||
// @todo: If and when the PHP bug gets solved, add an upper limit
|
||||
// version check.
|
||||
if (version_compare(PHP_VERSION, '5.5', '>=')) {
|
||||
$operations += array(
|
||||
'rotate_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5, 0xFF00FF), // Fuchsia background.
|
||||
'width' => 41,
|
||||
'height' => 23,
|
||||
'corners' => array_fill(0, 4, $this->fuchsia),
|
||||
),
|
||||
'rotate_transparent_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5),
|
||||
'width' => 41,
|
||||
'height' => 23,
|
||||
'corners' => array_fill(0, 4, $this->rotate_transparent),
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$operations += array(
|
||||
'rotate_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5, 0xFF00FF), // Fuchsia background.
|
||||
'width' => 42,
|
||||
'height' => 24,
|
||||
'corners' => array_fill(0, 4, $this->fuchsia),
|
||||
),
|
||||
'rotate_transparent_5' => array(
|
||||
'function' => 'rotate',
|
||||
'arguments' => array(5),
|
||||
'width' => 42,
|
||||
'height' => 24,
|
||||
'corners' => array_fill(0, 4, $this->rotate_transparent),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Systems using non-bundled GD2 don't have imagefilter. Test if available.
|
||||
@@ -430,6 +462,11 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
|
||||
}
|
||||
// Now check each of the corners to ensure color correctness.
|
||||
foreach ($values['corners'] as $key => $corner) {
|
||||
// The test gif that does not have transparency has yellow where the
|
||||
// others have transparent.
|
||||
if ($file === 'image-test-no-transparency.gif' && $corner === $this->transparent) {
|
||||
$corner = $this->yellow;
|
||||
}
|
||||
// Get the location of the corner.
|
||||
switch ($key) {
|
||||
case 0:
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -7,8 +7,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = _missing_dependency
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = system_incompatible_core_version_test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 5.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -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 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = 1.0
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = drupal:filter
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = system_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
20
modules/simpletest/tests/system_test.install
Normal file
20
modules/simpletest/tests/system_test.install
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Install, update and uninstall functions for the system_test module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function system_test_schema() {
|
||||
// Trigger a search for a module in the filesystem when requested by
|
||||
// system_test_drupal_get_filename_with_schema_rebuild().
|
||||
if (variable_get('system_test_drupal_get_filename_attempt_recursive_rebuild')) {
|
||||
$module_name = variable_get('system_test_drupal_get_filename_test_module_name');
|
||||
drupal_get_filename('module', $module_name);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
@@ -127,6 +127,20 @@ function system_test_menu() {
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
|
||||
$items['system-test/drupal-get-filename'] = array(
|
||||
'title' => 'Test drupal_get_filename()',
|
||||
'page callback' => 'system_test_drupal_get_filename',
|
||||
'access callback' => TRUE,
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
|
||||
$items['system-test/drupal-get-filename-with-schema-rebuild'] = array(
|
||||
'title' => 'Test drupal_get_filename() with a schema rebuild',
|
||||
'page callback' => 'system_test_drupal_get_filename_with_schema_rebuild',
|
||||
'access callback' => TRUE,
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
@@ -482,3 +496,76 @@ function system_test_request_destination() {
|
||||
// information.
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Page callback to run drupal_get_filename() on a particular module.
|
||||
*/
|
||||
function system_test_drupal_get_filename() {
|
||||
// Prevent SimpleTest from failing as a result of the expected PHP warnings
|
||||
// this function causes. Any warnings will be recorded in the database logs
|
||||
// for examination by the tests.
|
||||
define('SIMPLETEST_COLLECT_ERRORS', FALSE);
|
||||
|
||||
$module_name = variable_get('system_test_drupal_get_filename_test_module_name');
|
||||
drupal_get_filename('module', $module_name);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Page callback to run drupal_get_filename() and do a schema rebuild.
|
||||
*/
|
||||
function system_test_drupal_get_filename_with_schema_rebuild() {
|
||||
// Prevent SimpleTest from failing as a result of the expected PHP warnings
|
||||
// this function causes.
|
||||
define('SIMPLETEST_COLLECT_ERRORS', FALSE);
|
||||
|
||||
// Record the original database tables from drupal_get_schema().
|
||||
variable_set('system_test_drupal_get_filename_with_schema_rebuild_original_tables', array_keys(drupal_get_schema(NULL, TRUE)));
|
||||
|
||||
// Trigger system_test_schema() and system_test_watchdog() to perform an
|
||||
// attempted recursive rebuild when drupal_get_schema() is called. See
|
||||
// BootstrapGetFilenameWebTestCase::testRecursiveRebuilds().
|
||||
variable_set('system_test_drupal_get_filename_attempt_recursive_rebuild', TRUE);
|
||||
drupal_get_schema(NULL, TRUE);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_watchdog().
|
||||
*/
|
||||
function system_test_watchdog($log_entry) {
|
||||
// If an attempted recursive schema rebuild has been triggered by
|
||||
// system_test_drupal_get_filename_with_schema_rebuild(), perform the rebuild
|
||||
// in response to the missing file message triggered by system_test_schema().
|
||||
if (!variable_get('system_test_drupal_get_filename_attempt_recursive_rebuild')) {
|
||||
return;
|
||||
}
|
||||
if ($log_entry['type'] != 'php' || $log_entry['severity'] != WATCHDOG_WARNING) {
|
||||
return;
|
||||
}
|
||||
$module_name = variable_get('system_test_drupal_get_filename_test_module_name');
|
||||
if (!isset($log_entry['variables']['!message']) || strpos($log_entry['variables']['!message'], format_string('The following module is missing from the file system: %name', array('%name' => $module_name))) === FALSE) {
|
||||
return;
|
||||
}
|
||||
variable_set('system_test_drupal_get_filename_with_schema_rebuild_final_tables', array_keys(drupal_get_schema()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_module_implements_alter().
|
||||
*/
|
||||
function system_test_module_implements_alter(&$implementations, $hook) {
|
||||
// For BootstrapGetFilenameWebTestCase::testRecursiveRebuilds() to work
|
||||
// correctly, this module's hook_schema() implementation cannot be either the
|
||||
// first implementation (since that would trigger a potential recursive
|
||||
// rebuild before anything is in the drupal_get_schema() cache) or the last
|
||||
// implementation (since that would trigger a potential recursive rebuild
|
||||
// after the cache is already complete). So put it somewhere in the middle.
|
||||
if ($hook == 'schema') {
|
||||
$group = $implementations['system_test'];
|
||||
unset($implementations['system_test']);
|
||||
$count = count($implementations);
|
||||
$implementations = array_merge(array_slice($implementations, 0, $count / 2, TRUE), array('system_test' => $group), array_slice($implementations, $count / 2, NULL, TRUE));
|
||||
}
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = taxonomy
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -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 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ hidden = TRUE
|
||||
|
||||
settings[subtheme_override] = subtheme value
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -17,8 +17,8 @@ stylesheets[all][] = system.base.css
|
||||
|
||||
settings[theme_test_setting] = default value
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -31,6 +31,19 @@ function update_script_test_requirements($phase) {
|
||||
'severity' => REQUIREMENT_ERROR,
|
||||
);
|
||||
break;
|
||||
case REQUIREMENT_INFO:
|
||||
$requirements['update_script_test_stop'] = array(
|
||||
'title' => 'Update script test stop',
|
||||
'value' => 'Error',
|
||||
'description' => 'This is a requirements error provided by the update_script_test module to stop the page redirect for the info.',
|
||||
'severity' => REQUIREMENT_ERROR,
|
||||
);
|
||||
$requirements['update_script_test'] = array(
|
||||
'title' => 'Update script test',
|
||||
'description' => 'This is a requirements info provided by the update_script_test module.',
|
||||
'severity' => REQUIREMENT_INFO,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -19919,7 +19919,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '1',
|
||||
'name' => 'vocabulary 1 (i=0)',
|
||||
'description' => 'description of vocabulary 1 (i=0)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 1 (i=0)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -19932,7 +19932,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '2',
|
||||
'name' => 'vocabulary 2 (i=1)',
|
||||
'description' => 'description of vocabulary 2 (i=1)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 2 (i=1)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -19945,7 +19945,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '3',
|
||||
'name' => 'vocabulary 3 (i=2)',
|
||||
'description' => 'description of vocabulary 3 (i=2)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 3 (i=2)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -19958,7 +19958,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '4',
|
||||
'name' => 'vocabulary 4 (i=3)',
|
||||
'description' => 'description of vocabulary 4 (i=3)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 4 (i=3)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -19971,7 +19971,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '5',
|
||||
'name' => 'vocabulary 5 (i=4)',
|
||||
'description' => 'description of vocabulary 5 (i=4)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 5 (i=4)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -19984,7 +19984,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '6',
|
||||
'name' => 'vocabulary 6 (i=5)',
|
||||
'description' => 'description of vocabulary 6 (i=5)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 6 (i=5)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -19997,7 +19997,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '7',
|
||||
'name' => 'vocabulary 7 (i=6)',
|
||||
'description' => 'description of vocabulary 7 (i=6)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 7 (i=6)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20010,7 +20010,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '8',
|
||||
'name' => 'vocabulary 8 (i=7)',
|
||||
'description' => 'description of vocabulary 8 (i=7)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 8 (i=7)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20023,7 +20023,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '9',
|
||||
'name' => 'vocabulary 9 (i=8)',
|
||||
'description' => 'description of vocabulary 9 (i=8)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 9 (i=8)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20036,7 +20036,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '10',
|
||||
'name' => 'vocabulary 10 (i=9)',
|
||||
'description' => 'description of vocabulary 10 (i=9)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 10 (i=9)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20049,7 +20049,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '11',
|
||||
'name' => 'vocabulary 11 (i=10)',
|
||||
'description' => 'description of vocabulary 11 (i=10)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 11 (i=10)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20062,7 +20062,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '12',
|
||||
'name' => 'vocabulary 12 (i=11)',
|
||||
'description' => 'description of vocabulary 12 (i=11)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 12 (i=11)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -20075,7 +20075,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '13',
|
||||
'name' => 'vocabulary 13 (i=12)',
|
||||
'description' => 'description of vocabulary 13 (i=12)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 13 (i=12)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20088,7 +20088,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '14',
|
||||
'name' => 'vocabulary 14 (i=13)',
|
||||
'description' => 'description of vocabulary 14 (i=13)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 14 (i=13)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20101,7 +20101,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '15',
|
||||
'name' => 'vocabulary 15 (i=14)',
|
||||
'description' => 'description of vocabulary 15 (i=14)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 15 (i=14)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20114,7 +20114,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '16',
|
||||
'name' => 'vocabulary 16 (i=15)',
|
||||
'description' => 'description of vocabulary 16 (i=15)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 16 (i=15)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20127,7 +20127,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '17',
|
||||
'name' => 'vocabulary 17 (i=16)',
|
||||
'description' => 'description of vocabulary 17 (i=16)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 17 (i=16)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20140,7 +20140,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '18',
|
||||
'name' => 'vocabulary 18 (i=17)',
|
||||
'description' => 'description of vocabulary 18 (i=17)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 18 (i=17)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
@@ -20153,7 +20153,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '19',
|
||||
'name' => 'vocabulary 19 (i=18)',
|
||||
'description' => 'description of vocabulary 19 (i=18)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 19 (i=18)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '0',
|
||||
@@ -20166,7 +20166,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '20',
|
||||
'name' => 'vocabulary 20 (i=19)',
|
||||
'description' => 'description of vocabulary 20 (i=19)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 20 (i=19)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '1',
|
||||
@@ -20179,7 +20179,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '21',
|
||||
'name' => 'vocabulary 21 (i=20)',
|
||||
'description' => 'description of vocabulary 21 (i=20)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 21 (i=20)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '0',
|
||||
@@ -20192,7 +20192,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '22',
|
||||
'name' => 'vocabulary 22 (i=21)',
|
||||
'description' => 'description of vocabulary 22 (i=21)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 22 (i=21)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '0',
|
||||
'multiple' => '1',
|
||||
@@ -20205,7 +20205,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '23',
|
||||
'name' => 'vocabulary 23 (i=22)',
|
||||
'description' => 'description of vocabulary 23 (i=22)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 23 (i=22)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '1',
|
||||
'multiple' => '0',
|
||||
@@ -20218,7 +20218,7 @@ db_insert('vocabulary')->fields(array(
|
||||
'vid' => '24',
|
||||
'name' => 'vocabulary 24 (i=23)',
|
||||
'description' => 'description of vocabulary 24 (i=23)',
|
||||
'help' => '',
|
||||
'help' => 'help for vocabulary 24 (i=23)',
|
||||
'relations' => '1',
|
||||
'hierarchy' => '2',
|
||||
'multiple' => '1',
|
||||
|
@@ -74,9 +74,10 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
$this->assertEqual($voc_keys, $inst_keys, 'Node type page has instances for every vocabulary.');
|
||||
|
||||
// Ensure instance variables are getting through.
|
||||
foreach ($instances as $instance) {
|
||||
$this->assertTrue(isset($instance['required']), 'The required setting was preserved during the upgrade path.');
|
||||
$this->assertTrue($instance['description'], 'The description was preserved during the upgrade path');
|
||||
foreach (array_unique($instances) as $instance) {
|
||||
$field_instance = field_info_instance('node', $instance, 'page');
|
||||
$this->assertTrue(isset($field_instance['required']), 'The required setting was preserved during the upgrade path.');
|
||||
$this->assertTrue($field_instance['description'], 'The description was preserved during the upgrade path');
|
||||
}
|
||||
|
||||
// Node type 'story' was not explicitly in $vocabulary->nodes but
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
Reference in New Issue
Block a user