You are here

function XMLSitemapUnitTest::testAssertFlag in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.test \XMLSitemapUnitTest::testAssertFlag()

File

./xmlsitemap.test, line 359
Unit tests for the xmlsitemap module.

Class

XMLSitemapUnitTest

Code

function testAssertFlag() {
  variable_set('xmlsitemap_rebuild_needed', TRUE);
  $this
    ->assertTrue(xmlsitemap_var('rebuild_needed'));
  $this
    ->assertTrue($this
    ->assertFlag('rebuild_needed', TRUE, FALSE));
  $this
    ->assertTrue(xmlsitemap_var('rebuild_needed'));
  $this
    ->assertTrue($this
    ->assertFlag('rebuild_needed', TRUE, TRUE));
  $this
    ->assertFalse(xmlsitemap_var('rebuild_needed'));
  $this
    ->assertTrue($this
    ->assertFlag('rebuild_needed', FALSE, FALSE));
  $this
    ->assertFalse(xmlsitemap_var('rebuild_needed'));
}