Content Filtering: Covered new config options and filters with tests

This commit is contained in:
Dan Brown
2026-02-16 10:11:48 +00:00
parent 035be66ebc
commit 8a221f64e4
5 changed files with 96 additions and 5 deletions

View File

@@ -170,6 +170,20 @@ class ConfigTest extends TestCase
}
}
public function test_content_filtering_defaults_to_enabled()
{
$this->runWithEnv(['APP_CONTENT_FILTERING' => null, 'ALLOW_CONTENT_SCRIPTS' => null], function () {
$this->assertEquals('jhfa', config('app.content_filtering'));
});
}
public function test_allow_content_scripts_disables_content_filtering()
{
$this->runWithEnv(['APP_CONTENT_FILTERING' => null, 'ALLOW_CONTENT_SCRIPTS' => 'true'], function () {
$this->assertEquals('', config('app.content_filtering'));
});
}
/**
* Set an environment variable of the given name and value
* then check the given config key to see if it matches the given result.