updated date pathauto addressfield honeypot features modules
This commit is contained in:
@@ -171,6 +171,65 @@ class HoneypotFormTestCase extends DrupalWebTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Honeypot's CSS generation routines.
|
||||
*/
|
||||
class HoneypotCssTestCase extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Honeypot CSS tests',
|
||||
'description' => 'Ensure that Honeypot rebuilds its CSS file correctly.',
|
||||
'group' => 'Form API',
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
// Enable modules required for this test.
|
||||
parent::setUp(array('honeypot'));
|
||||
|
||||
// Set up required Honeypot variables.
|
||||
variable_set('honeypot_element_name', 'url');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test CSS file regeneration.
|
||||
*/
|
||||
public function testHoneypotCssRegeneration() {
|
||||
$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));
|
||||
|
||||
// Create the CSS file.
|
||||
honeypot_create_css(variable_get('honeypot_element_name', 'url'));
|
||||
|
||||
// Make sure the Honeypot CSS file exists.
|
||||
$this->assertTrue(file_exists($honeypot_css));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test cron-based CSS file regeneration
|
||||
*/
|
||||
public function testHoneypotCssRegenerationOnCron() {
|
||||
$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 the functionality of the Honeypot module's integration with Trigger.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user