function testKeyCacheUpdate() { $testUser = '******'; \OCA\Files_Encryption\Keymanager::setPublicKey('oldKey', $testUser); $this->assertSame('oldKey', \OCA\Files_Encryption\Keymanager::getPublicKey($this->view, $testUser)); // update key \OCA\Files_Encryption\Keymanager::setPublicKey('newKey', $testUser); $this->assertSame('newKey', \OCA\Files_Encryption\Keymanager::getPublicKey($this->view, $testUser)); // cleanup \OCA\Files_Encryption\Keymanager::deletePublicKey($this->view, $testUser); }