security updates
have to check views and entityreference for custom patches
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user