コード例 #1
0
 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());
 }
コード例 #2
0
 /**
  * Creates a new keyPair.
  */
 public function createKeyPair()
 {
     $this->logger->info('Generating new KeyPair in {storageLocation}', ['storageLocation' => $this->storage->getRootPath()]);
     $this->storeKeyPair($this->manager->generateKeyPair());
 }
コード例 #3
0
 public function test getRootPath returns the original storagePath()
 {
     $this->assertSame($this->dummyStoragePath, $this->service->getRootPath());
 }