assertTrue($enabledTask->isEnabled()); $enabledTask->config()->set('is_enabled', false); $this->assertFalse($enabledTask->isEnabled()); // disabledTask $disabledTask = new class extends BuildTask { protected $enabled = false; public function run($request) { // noop } }; $this->assertFalse($disabledTask->isEnabled()); $disabledTask->config()->set('is_enabled', true); $this->assertTrue($disabledTask->isEnabled()); } }