Exemplo n.º 1
0
 public function testSetEnabled()
 {
     $model = new State($this->config, $this->writer);
     $this->assertFalse($model->isEnabled('cache_type'));
     $model->setEnabled('cache_type', true);
     $this->assertTrue($model->isEnabled('cache_type'));
     $model->setEnabled('cache_type', false);
     $this->assertFalse($model->isEnabled('cache_type'));
 }
Exemplo n.º 2
0
 public function testResume()
 {
     $this->assertTrue($this->model->isEnabled());
     $this->model->resume(null);
     $this->assertNull($this->model->isEnabled());
     $this->model->resume();
     $this->assertNull($this->model->isEnabled());
     $this->model->resume(false);
     $this->assertFalse($this->model->isEnabled());
 }