[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of the Symfony package. 5 * 6 * (c) Fabien Potencier <[email protected]> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12 namespace Symfony\Component\Console\Tester\Constraint; 13 14 use PHPUnit\Framework\Constraint\Constraint; 15 use Symfony\Component\Console\Command\Command; 16 17 final class CommandIsSuccessful extends Constraint 18 { 19 /** 20 * {@inheritdoc} 21 */ 22 public function toString(): string 23 { 24 return 'is successful'; 25 } 26 27 /** 28 * {@inheritdoc} 29 */ 30 protected function matches($other): bool 31 { 32 return Command::SUCCESS === $other; 33 } 34 35 /** 36 * {@inheritdoc} 37 */ 38 protected function failureDescription($other): string 39 { 40 return 'the command '.$this->toString(); 41 } 42 43 /** 44 * {@inheritdoc} 45 */ 46 protected function additionalFailureDescription($other): string 47 { 48 $mapping = [ 49 Command::FAILURE => 'Command failed.', 50 Command::INVALID => 'Command was invalid.', 51 ]; 52 53 return $mapping[$other] ?? sprintf('Command returned exit status %d.', $other); 54 } 55 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |