Expand test coverage.

This commit is contained in:
James Cole
2018-06-01 22:04:52 +02:00
parent 2a05cc382f
commit a7b8470d9e
31 changed files with 951 additions and 173 deletions

View File

@@ -424,7 +424,7 @@ class ProfileController extends Controller
/**
*
*/
private function createOAuthKeys()
private function createOAuthKeys(): void
{
$rsa = new RSA();
$keys = $rsa->createKey(4096);
@@ -437,11 +437,13 @@ class ProfileController extends Controller
if (file_exists($publicKey) || file_exists($privateKey)) {
return;
}
// @codeCoverageIgnoreStart
Log::alert('NO OAuth keys were found. They have been created.');
file_put_contents($publicKey, array_get($keys, 'publickey'));
file_put_contents($privateKey, array_get($keys, 'privatekey'));
}
// @codeCoverageIgnoreEnd
/**
* @return string