This commit is contained in:
2020-02-01 16:47:12 +07:00
commit 4c619ad6e6
16739 changed files with 3329179 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Codeception\Event;
class FailEvent extends TestEvent
{
/**
* @var \Exception
*/
protected $fail;
/**
* @var int
*/
protected $count;
public function __construct(\PHPUnit\Framework\Test $test, $time, $e, $count = 0)
{
parent::__construct($test, $time);
$this->fail = $e;
$this->count = $count;
}
public function getCount()
{
return $this->count;
}
public function getFail()
{
return $this->fail;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Codeception\Event;
use Symfony\Component\EventDispatcher\Event;
class PrintResultEvent extends Event
{
/**
* @var \PHPUnit\Framework\TestResult
*/
protected $result;
/**
* @var \PHPUnit\Util\Printer
*/
protected $printer;
public function __construct(\PHPUnit\Framework\TestResult $result, \PHPUnit\Util\Printer $printer)
{
$this->result = $result;
$this->printer = $printer;
}
/**
* @return \PHPUnit\Util\Printer
*/
public function getPrinter()
{
return $this->printer;
}
/**
* @return \PHPUnit\Framework\TestResult
*/
public function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Codeception\Event;
use Codeception\Step;
use Codeception\TestInterface;
use Symfony\Component\EventDispatcher\Event;
class StepEvent extends Event
{
/**
* @var Step
*/
protected $step;
/**
* @var TestInterface
*/
protected $test;
public function __construct(TestInterface $test, Step $step)
{
$this->test = $test;
$this->step = $step;
}
public function getStep()
{
return $this->step;
}
/**
* @return TestInterface
*/
public function getTest()
{
return $this->test;
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace Codeception\Event;
use Codeception\Suite;
use Symfony\Component\EventDispatcher\Event;
class SuiteEvent extends Event
{
/**
* @var \PHPUnit\Framework\TestSuite
*/
protected $suite;
/**
* @var \PHPUnit\Framework\TestResult
*/
protected $result;
/**
* @var array
*/
protected $settings;
public function __construct(
\PHPUnit\Framework\TestSuite $suite,
\PHPUnit\Framework\TestResult $result = null,
$settings = []
) {
$this->suite = $suite;
$this->result = $result;
$this->settings = $settings;
}
/**
* @return Suite
*/
public function getSuite()
{
return $this->suite;
}
/**
* @return \PHPUnit\Framework\TestResult
*/
public function getResult()
{
return $this->result;
}
public function getSettings()
{
return $this->settings;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Codeception\Event;
use Symfony\Component\EventDispatcher\Event;
class TestEvent extends Event
{
/**
* @var \PHPUnit\Framework\Test
*/
protected $test;
/**
* @var float Time taken
*/
protected $time;
public function __construct(\PHPUnit\Framework\Test $test, $time = 0)
{
$this->test = $test;
$this->time = $time;
}
/**
* @return float
*/
public function getTime()
{
return $this->time;
}
/**
* @return \Codeception\TestInterface
*/
public function getTest()
{
return $this->test;
}
}