/** * @covers ::checkPublicApiKey * @covers ::generateApiPublicKey */ public function testCheckPublicApiKey() { $this->assertFalse($this->mockUser->checkPublicApiKey('')); $expected = sha1($this->mockUser->getCreated()->format(\DateTime::ATOM) . $this->mockUser->getApiKeyPrivate()); $this->assertTrue($this->mockUser->checkPublicApiKey($expected)); }