public function XmlSitemapUnitTest::testAssertFlag in XML sitemap 8
Same name and namespace in other branches
- 2.x tests/src/Functional/XmlSitemapUnitTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapUnitTest::testAssertFlag()
Tests for xmlsitemap flags.
File
- tests/
src/ Functional/ XmlSitemapUnitTest.php, line 28
Class
- XmlSitemapUnitTest
- Unit tests for the XML sitemap module.
Namespace
Drupal\Tests\xmlsitemap\FunctionalCode
public function testAssertFlag() {
$this->state
->set('xmlsitemap_rebuild_needed', TRUE);
$this
->assertTrue(xmlsitemap_var('xmlsitemap_rebuild_needed'));
$this
->assertTrue($this
->assertFlag('xmlsitemap_rebuild_needed', TRUE, FALSE));
$this
->assertTrue(xmlsitemap_var('xmlsitemap_rebuild_needed'));
$this
->assertTrue($this
->assertFlag('xmlsitemap_rebuild_needed', TRUE, TRUE));
$this
->assertFalse(xmlsitemap_var('xmlsitemap_rebuild_needed'));
$this
->assertTrue($this
->assertFlag('xmlsitemap_rebuild_needed', FALSE, FALSE));
$this
->assertFalse(xmlsitemap_var('xmlsitemap_rebuild_needed'));
}