/**
  * @covers ::validate
  */
 public function testValidateRequired()
 {
     $module = $this->randomMachineName();
     $this->uninstallValidator->expects($this->once())->method('getModuleInfoByModule')->willReturn(['required' => TRUE, 'name' => $module]);
     $expected = ["The {$module} module is required"];
     $reasons = $this->uninstallValidator->validate($module);
     $this->assertSame($expected, $this->castSafeStrings($reasons));
 }
 /**
  * @covers ::validate
  */
 public function testValidateRequired()
 {
     $module = $this->randomMachineName();
     $this->uninstallValidator->expects($this->once())->method('getModuleInfoByModule')->willReturn(['required' => TRUE, 'name' => $module]);
     $expected = [SafeMarkup::format('The @module module is required', ['@module' => $module])];
     $reasons = $this->uninstallValidator->validate($module);
     $this->assertSame($expected, $reasons);
 }