Final Class Yiisoft\Yii\Debug\Api\Inspector\Test\CodeceptionJSONReporter
| Inheritance | Yiisoft\Yii\Debug\Api\Inspector\Test\CodeceptionJSONReporter » Codeception\Extension |
|---|
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $events | array | Yiisoft\Yii\Debug\Api\Inspector\Test\CodeceptionJSONReporter |
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $config | array | Yiisoft\Yii\Debug\Api\Inspector\Test\CodeceptionJSONReporter |
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| FILENAME | 'codeception-report.json' | Yiisoft\Yii\Debug\Api\Inspector\Test\CodeceptionJSONReporter |
Property Details
Method Details
| public void _initialize ( ) |
public function _initialize(): void
{
$this->_reconfigure(['settings' => ['silent' => true]]);
}
| public void all ( \Codeception\Event\PrintResultEvent $event ) | ||
| $event | \Codeception\Event\PrintResultEvent | |
public function all(PrintResultEvent $event): void
{
file_put_contents(
$this->config['output-path'] . DIRECTORY_SEPARATOR . self::FILENAME,
json_encode($this->data, JSON_THROW_ON_ERROR)
);
}
| public void error ( \Codeception\Event\FailEvent $event ) | ||
| $event | \Codeception\Event\FailEvent | |
public function error(FailEvent $event): void
{
$this->data[] = [
'file' => $this->getTestFilename($event),
'test' => $this->getTestName($event),
'time' => $event->getTime(),
'status' => 'error',
'stacktrace' => $event->getFail()->getTrace(),
];
}
| public void fail ( \Codeception\Event\FailEvent $event ) | ||
| $event | \Codeception\Event\FailEvent | |
public function fail(FailEvent $event): void
{
$this->data[] = [
'file' => $this->getTestFilename($event),
'test' => $this->getTestName($event),
'time' => $event->getTime(),
'status' => 'fail',
'stacktrace' => $event->getFail()->getTrace(),
];
}
| public void success ( \Codeception\Event\TestEvent $event ) | ||
| $event | \Codeception\Event\TestEvent | |
public function success(TestEvent $event): void
{
$this->data[] = [
'file' => $this->getTestFilename($event),
'test' => $this->getTestName($event),
'time' => $event->getTime(),
'status' => 'ok',
'stacktrace' => [],
];
}
Signup or Login in order to comment.