security updates

have to check views and entityreference for custom patches
This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 20:45:16 +02:00
parent 802ec0c6f3
commit b3221c71e2
516 changed files with 14267 additions and 7349 deletions

View File

@@ -88,19 +88,44 @@ class ContextReactionBlockAjaxTest extends DrupalWebTestCase {
}
function setUp() {
parent::setUp('context', 'ctools');
$admin_user = $this->drupalCreateUser(array('administer site configuration'));
parent::setUp('context', 'context_ui', 'ctools');
$admin_user = $this->drupalCreateUser(array('context ajax block access'));
$this->drupalLogin($admin_user);
}
function test() {
$token = drupal_hmac_base64('user-online', $this->session_id . drupal_get_private_key() . drupal_get_hash_salt());
$this->drupalGet('node', array(
'query' => array('context_block' => 'user-online,testcontext', 'context_token' => $token)
'query' => array('context_block' => 'user-online,testcontext')
));
$this->assertText('"status":1', 'Successful return status. $drupal_hash_salt must be set explicitly for this test to pass');
$this->assertText('Who\\u0027s online', 'Expected text in block data. drupal_hash_salt must be set explicitly for this test to pass');
$this->assertText('"status":1', 'Successful return status.');
$this->assertText('Who\\u0027s online', 'Expected text in block data.');
}
}
class ContextReactionBlockAjaxAccessTest extends DrupalWebTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'Reaction: block ajax access',
'description' => 'Test block reaction ajax access behavior.',
'group' => 'Context',
);
}
function setUp() {
parent::setUp('context', 'ctools');
$admin_user = $this->drupalCreateUser();
$this->drupalLogin($admin_user);
}
function test() {
$this->drupalGet('node', array(
'query' => array('context_block' => 'user-online,testcontext')
));
$this->assertText('"status":0', 'Failed return status.');
}
}