Roeland Jago Douma 7 лет назад
Родитель
Сommit
1cdf4e9540
Аккаунт пользователя с таким Email не найден

+ 1
- 1
settings/Controller/SecuritySettingsController.php Просмотреть файл

@@ -61,7 +61,7 @@ class SecuritySettingsController extends Controller {
* @return array
*/
public function trustedDomains($newTrustedDomain) {
$trustedDomains = $this->config->getSystemValue('trusted_domains');
$trustedDomains = $this->config->getSystemValue('trusted_domains', []);
$trustedDomains[] = $newTrustedDomain;
$this->config->setSystemValue('trusted_domains', $trustedDomains);


+ 2
- 2
tests/Settings/Controller/SecuritySettingsControllerTest.php Просмотреть файл

@@ -57,8 +57,8 @@ class SecuritySettingsControllerTest extends \PHPUnit_Framework_TestCase {
$this->container['Config']
->expects($this->once())
->method('getSystemValue')
->with('trusted_domains')
->will($this->returnValue(''));
->with($this->equalTo('trusted_domains'), $this->equalTo([]))
->willReturn([]);

$response = $this->securitySettingsController->trustedDomains('newdomain.com');
$expectedResponse = array('status' => 'success');

Загрузка…
Отмена
Сохранить