RunMyBusiness\Initialcon\Tests\InitialconTest::testHash PHP Метод

testHash() публичный Метод

public testHash ( )
    public function testHash()
    {
        for ($i = 0; $i < 10; $i++) {
            // Get the previous hash
            $previousHash = $this->initialcon->getHash();
            // Set a new string
            $this->initialcon->setIdentifier($this->faker->email);
            $this->initialcon->setInitials($this->faker->firstname);
            // Test the hash length
            $this->assertEquals(32, strlen($this->initialcon->getHash()));
            // Test the hash generation result
            $this->assertThat($this->initialcon->getHash(), $this->logicalNot($this->equalTo($previousHash)));
        }
    }