/** * @test */ public function shutdownDoesNotSavesKeysToKeystoreFileIfKeysWereNotModified() { $this->assertFalse(file_exists('vfs://Foo/EncryptionKey')); $keyPairUuid = $this->rsaWalletService->generateNewKeypair(TRUE); $this->rsaWalletService->shutdownObject(); $this->assertTrue(file_exists('vfs://Foo/EncryptionKey')); $this->rsaWalletService->initializeObject(); $this->rsaWalletService->getPublicKey($keyPairUuid); // Hack: remove the file so we can actually detect if shutdown() would write it: unlink('vfs://Foo/EncryptionKey'); $this->rsaWalletService->shutdownObject(); $this->assertFalse(file_exists('vfs://Foo/EncryptionKey')); }