11 use PHPUnit\Framework\TestCase;
    26     private $cryptKeyGenerator;
    30         $this->randomMock = $this->getMockBuilder(Random::class)
    31             ->disableOriginalConstructor()
    40             ->expects($this->once())
    41             ->method(
'getRandomString')
    44         $this->cryptKeyGenerator->generate();
    49         $expected = 
'fdb7594e77f1ad5fbb8e6c917b6012ce'; 
    52             ->method(
'getRandomString')
    53             ->willReturn(
'magento2');
    55         $actual = $this->cryptKeyGenerator->generate();
    57         $this->assertEquals($expected, $actual);
 
testStringForHashingIsReadFromRandom()
testReturnsMd5OfRandomString()