You are here

public function HoneypotCssTestCase::testHoneypotCssRegenerationOnCron in Honeypot 7

Test cron-based CSS file regeneration.

File

./honeypot.test, line 340
Testing for Honeypot module.

Class

HoneypotCssTestCase
Test Honeypot's CSS generation routines.

Code

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));
}