$description =
file_get_contents(sprintf('%s/../Fixtures/%s.%s', __DIR__,
$name,
static::
getFormat()));
$data[] =
[$object,
$description];
} return $data;
} protected function assertDescription($expectedDescription,
$describedObject, array
$options =
[]) { $output =
new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true
);
$this->
getDescriptor()->
describe($output,
$describedObject,
$options +
['raw_output' => true
]);
$this->
assertEquals($this->
normalizeOutput($expectedDescription),
$this->
normalizeOutput($output->
fetch()));
} protected function normalizeOutput(string
$output) { $output =
str_replace(['%%PHP_SELF%%', '%%PHP_SELF_FULL%%', '%%COMMAND_NAME%%', '%%SHELL%%'
],
[$_SERVER['PHP_SELF'
],
realpath($_SERVER['PHP_SELF'
]),
basename($_SERVER['PHP_SELF'
]),
basename($_SERVER['SHELL'
] ?? ''
)],
$output);
return trim(str_replace(\PHP_EOL, "\n",
$output));
}}