From the help doc
To view case comments: Read on cases
To add case comments and make case comments public: Edit or Create on cases
To edit or delete case comments added by other users: Modify All on cases
To edit, delete, or make public your existing case comments: Edit Case Comments
You can use Permission Sets or Profiles to ...
In order to see the extra information, you need to retrieve additional metadata. For example, this package would include a custom setting:
<?xml version="1.0" encoding="UTF-8"?>
The example was taken from an answer I gave on a separate question where I explained why you would want to do this.
You can use this pattern successfully in a trigger as well as long as the trigger uses the same mechanism for accessing the (cached) settings instance.
@David Reed's comment that the "proper way of exposing custom settings" is to insert them ...
They're the same as a CustomObject. You can retrieve one via the terminal:
sfdx force:source:retrieve -m CustomObject:CustomSettingName__c
In the Org Browser, they'll also be listed under Custom Objects.
Modify your package.xml from your manifest folder to include the below code
Then right click on package.xml and select Retreive Source in Manifest from Org
What both @Bilal and @Samir have said is accurate and true. However, I strongly recommend you try to avoid inserting custom settings instances into the database as part of your unit testing; we used to do this and it basically prevented us from using parallel test execution.
There is an "edge case" (or perhaps infrastructure bug) in the way that Salesforce ...
Just like normal SObjects, your Test Context doesn't have access to the custom setting records already in the database.
solution 1 (Recommended)
You need to insert a new Custom Setting record, in your test context like you would normally do with an SObject
Whatever_custom_setting__c setting = new Whatever_custom_setting__c();
setting.Name = 'Test Setting';...
You need to insert/create custom setting as test data like you setup other test data in your apex test class.
custom setting also behave like sObject. so the original data in them is not available until you set (SeeAllData=true) or insert custom setting data in test class.
You can insert custom setting in your test class like following.