1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Type annotations

This commit is contained in:
Jordi Boggiano 2021-10-16 10:16:06 +02:00
parent 626370d444
commit c3c6969cf5
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
21 changed files with 166 additions and 35 deletions

View file

@ -24,9 +24,21 @@ use React\Promise\Promise;
*/
class ProcessExecutorMock extends ProcessExecutor
{
/**
* @var array<array{cmd: string, return: int, stdout: string, stderr: string, callback: ?callable}>
*/
private $expectations = array();
/**
* @var bool
*/
private $strict = false;
/**
* @var array{return: int, stdout: string, stderr: string}
*/
private $defaultHandler = array('return' => 0, 'stdout' => '', 'stderr' => '');
/**
* @var string[]
*/
private $log = array();
/**
@ -47,7 +59,7 @@ class ProcessExecutorMock extends ProcessExecutor
return array_merge($default, $expect);
}, $expectations);
$this->strict = $strict;
$this->defaultHandler = array_merge($default, $defaultHandler);
$this->defaultHandler = array_merge($this->defaultHandler, $defaultHandler);
}
public function assertComplete(TestCase $testCase)