@@ -701,7 +701,7 @@ function update_fix_d7_requirements() {
}
// Add ssid column and index.
db_add_field('sessions','ssid',array('description'=>"Secure session ID. The value is generated by PHP's Session API.",'type'=>'varchar','length'=>128,'not null'=>TRUE,'default'=>''));
db_add_field('sessions','ssid',array('description'=>"Secure session ID. The value is generated by Drupal's session handlers.",'type'=>'varchar','length'=>128,'not null'=>TRUE,'default'=>''));
$this->assertResponse(403,t('Requesting http.php with a bad simpletest User-Agent fails.'));
$this->drupalGet($https_path);
$this->assertResponse(403,t('Requesting https.php with a bad simpletest User-Agent fails.'));
// Use a real User-Agent and verify that the special files http.php and
// https.php can't be accessed.
$this->additionalCurlOptions=array(CURLOPT_USERAGENT=>'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12');
$this->drupalGet($HTTP_path);
$this->assertResponse(403,t('Requesting http.php with a normal User-Agent fails.'));
$this->drupalGet($https_path);
$this->assertResponse(403,t('Requesting https.php with a normal User-Agent fails.'));
}
}
/**
* Make sure that tests selected through the web interface are run and
* that the results are displayed correctly.
...
...
@@ -274,10 +311,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
* Check if the test is being run from inside a CURL request.
*/
functioninCURL(){
// We cannot rely on drupal_static('drupal_test_info') here, because
// 'in_child_site' would be FALSE for the parent site when we are
// executing the tests. Default to direct detection of the HTTP headers.
@@ -113,7 +113,12 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
// Force our way into the session of the child site.
drupal_save_session(TRUE);
// A session cannot be written without the ssid column which is missing on
// Drupal 6 sites.
db_add_field('sessions','ssid',array('description'=>"Secure session ID. The value is generated by Drupal's session handlers.",'type'=>'varchar','length'=>128,'not null'=>TRUE,'default'=>''));