updated mailgun, mailsystem, honeypot, googleanalitycs, features, content_taxonomy

This commit is contained in:
2019-05-13 17:55:28 +02:00
parent 2ffad14939
commit e08a2639c6
54 changed files with 1911 additions and 423 deletions
@@ -366,6 +366,60 @@ class HoneypotCssTestCase extends DrupalWebTestCase {
// Revert the honeypot element name back to the original.
variable_set('honeypot_element_name', $original_element_name);
}
/**
* Test CSS works when default file scheme is not public://
*/
public function testHoneypotCssNonpublicFileSystem() {
variable_set('file_default_scheme', 'private');
$honeypot_css = honeypot_get_css_file_path();
// Delete the Honeypot CSS file (if it exists).
file_unmanaged_delete($honeypot_css);
// Make sure the Honeypot CSS file doesn't exist.
$this->assertFalse(file_exists($honeypot_css));
// Run cron.
honeypot_cron();
// Make sure the Honeypot CSS file exists.
$this->assertTrue(file_exists($honeypot_css));
}
/**
* Test CSS file availability.
*/
public function testHoneypotCssAvailability() {
// Public CSS file can be consumed.
variable_set('file_default_scheme', 'public');
if ($wrapper = file_stream_wrapper_get_instance_by_uri(honeypot_get_css_file_path())) {
$url = $wrapper->getExternalUrl();
}
$this->drupalGet($url);
$this->assertResponse(200);
// Private CSS file can not be consumed.
variable_set('file_default_scheme', 'private');
honeypot_cron();
if ($wrapper = file_stream_wrapper_get_instance_by_uri(honeypot_get_css_file_path())) {
$url = $wrapper->getExternalUrl();
}
$this->drupalGet($url);
$this->assertNoResponse(200);
// Site default is private, but override honeypot's to public to consume.
variable_set('honeypot_file_default_scheme', 'public');
honeypot_cron();
if ($wrapper = file_stream_wrapper_get_instance_by_uri(honeypot_get_css_file_path())) {
$url = $wrapper->getExternalUrl();
}
$this->drupalGet($url);
$this->assertResponse(200);
}
}
/**
@@ -423,4 +477,5 @@ class HoneypotTriggerTestCase extends DrupalWebTestCase {
$this->drupalGet('node');
$this->assertText(t('has been banned'), 'User banned successfully.');
}
}