Skip to content

Commit

Permalink
Add tests for enable/disable/enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 17, 2013
1 parent 4d3d54f commit e600e54
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Cake/Test/TestCase/Cache/CacheTest.php
Expand Up @@ -496,4 +496,16 @@ public function testSetOnAlternateConfigs() {
$this->assertEquals(strtotime('+1 year') - time(), $settings['duration']);
}

/**
* Test toggling enabled state of cache.
*
* @return void
*/
public function testEnableDisableEnabled() {
$this->assertNull(Cache::enable());
$this->assertTrue(Cache::enabled(), 'Should be on');
$this->assertNull(Cache::disable());
$this->assertFalse(Cache::enabled(), 'Should be off');
}

}

0 comments on commit e600e54

Please sign in to comment.