* @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);
$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');