. */ namespace SP\Tests\Domain\Account\Services; use SP\Domain\Account\Services\PublicLinkKey; use SP\Tests\UnitaryTestCase; /** * Class PublicLinkKeyTest * * @group unitary */ class PublicLinkKeyTest extends UnitaryTestCase { /** * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException */ public function testGetKeyWithoutHash() { $publicLinkKey = new PublicLinkKey(self::$faker->sha1); $this->assertNotEmpty($publicLinkKey->getKey()); $this->assertNotEmpty($publicLinkKey->getHash()); } /** * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException */ public function testGetKeyWithHash() { $hash = self::$faker->sha1; $publicLinkKey = new PublicLinkKey(self::$faker->sha1, $hash); $this->assertNotEmpty($publicLinkKey->getKey()); $this->assertEquals($hash, $publicLinkKey->getHash()); } }