You are here

public function XMLSitemapUnitTest::testAssertFlag in XML sitemap 7.2

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

Test Assert Flag.

File

./xmlsitemap.test, line 453
Unit tests for the xmlsitemap.

Class

XMLSitemapUnitTest
XML Sitemap UnitTest.

Code

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