/**
* @runInSeparateProcess
* @expectedException \RuntimeException
*/
public function testRandomWithFailure()
{
$this->php = FunctionMocker::start($this, 'Chromabits\\Nucleus\\Support')->mockFunction('function_exists')->mockFunction('openssl_random_pseudo_bytes')->getMock();
$this->php->expects($this->once())->method('function_exists')->will($this->returnValue(true));
$this->php->expects($this->once())->method('openssl_random_pseudo_bytes')->will($this->returnValue(false));
Str::random();
}