Example #1
0
 /**
  * @covers ::generateRandomApiKey
  * @covers ::generateApiPublicKey
  */
 public function testGenerateRandomApiKey()
 {
     $this->mockUser->generateRandomApiKey();
     $this->assertNotNull($this->mockUser->getApiKeyPrivate());
     $this->assertEquals(sha1($this->mockUser->getCreated()->format(\DateTime::ATOM) . $this->mockUser->getApiKeyPrivate()), $this->mockUser->getApiKeyPublic());
 }