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()); }
public function testCheck() { if (extension_loaded('curl') === false) { $this->markTestSkipped('PHP Extension "curl" is required, but not available'); } $this->assertTrue($this->checkInstance->check()); }
/** * 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; }
public function testCheck() { $this->assertTrue($this->checkInstance->check()); }
public function testCheckWithMissingProperties() { $this->assertFalse($this->checkInstance->check()); }
public function testGetFailureMessage() { $this->checkInstance->check(); $this->assertInternalType('string', $this->checkInstance->getFailureMessage()); }