public function setUp() { parent::setUp(); $this->mockLogger = $this->prophesize(LoggerInterface::class); $this->mockManager = $this->prophesize(KeyPairManager::class); $this->mockStorage = $this->prophesize(KeyPairStorage::class); $this->mockStorage->getRootPath()->willReturn('~/.acme/certificates'); $this->service = new KeyPairProvider($this->mockManager->reveal(), $this->mockStorage->reveal()); $this->service->setLogger($this->mockLogger->reveal()); }
/** * Creates a new keyPair. */ public function createKeyPair() { $this->logger->info('Generating new KeyPair in {storageLocation}', ['storageLocation' => $this->storage->getRootPath()]); $this->storeKeyPair($this->manager->generateKeyPair()); }
public function test getRootPath returns the original storagePath() { $this->assertSame($this->dummyStoragePath, $this->service->getRootPath()); }