コード例 #1
0
 public function testCheck()
 {
     if (extension_loaded('PDO') === false || extension_loaded('pdo_mysql') === false) {
         $this->markTestSkipped('PHP Extensions "PDO" and "pdo_mysql" are required, but not available');
     }
     $this->assertTrue($this->checkInstance->check());
 }
コード例 #2
0
 public function testCheck()
 {
     if (extension_loaded('curl') === false) {
         $this->markTestSkipped('PHP Extension "curl" is required, but not available');
     }
     $this->assertTrue($this->checkInstance->check());
 }
コード例 #3
0
ファイル: CheckCommand.php プロジェクト: sschuberth/Gerrie
 /**
  * Checks a single property
  *
  * @param OutputInterface $output
  * @param CheckInterface $property
  * @return bool
  */
 protected function checkProperty(OutputInterface $output, CheckInterface $property)
 {
     $result = $property->check();
     if ($result === false) {
         $outputLevel = 'error';
         $sign = self::EMOJI_FAILURE;
         if ($property->isOptional() === true) {
             $outputLevel = 'comment';
             $sign = self::EMOJI_OPTIONAL;
         }
         $message = $property->getFailureMessage();
         // The default value from overallResult is true.
         // So it is enough to set it to false once.
         $this->overallResult = false;
     } elseif ($result === true) {
         $outputLevel = 'info';
         $sign = self::EMOJI_OK;
         $message = $property->getSuccessMessage();
     }
     $outputMessage = "  <info>%s</info>   <%s>%s</%s>";
     $outputMessage = sprintf($outputMessage, $sign, $outputLevel, $message, $outputLevel);
     $output->writeln($outputMessage);
     return $result;
 }
コード例 #4
0
ファイル: SSHCheckTest.php プロジェクト: sschuberth/Gerrie
 public function testCheck()
 {
     $this->assertTrue($this->checkInstance->check());
 }
コード例 #5
0
 public function testCheckWithMissingProperties()
 {
     $this->assertFalse($this->checkInstance->check());
 }
コード例 #6
0
 public function testGetFailureMessage()
 {
     $this->checkInstance->check();
     $this->assertInternalType('string', $this->checkInstance->getFailureMessage());
 }