init
This commit is contained in:
32
vendor/codeception/base/src/Codeception/Event/FailEvent.php
vendored
Normal file
32
vendor/codeception/base/src/Codeception/Event/FailEvent.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
39
vendor/codeception/base/src/Codeception/Event/PrintResultEvent.php
vendored
Normal file
39
vendor/codeception/base/src/Codeception/Event/PrintResultEvent.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
38
vendor/codeception/base/src/Codeception/Event/StepEvent.php
vendored
Normal file
38
vendor/codeception/base/src/Codeception/Event/StepEvent.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
54
vendor/codeception/base/src/Codeception/Event/SuiteEvent.php
vendored
Normal file
54
vendor/codeception/base/src/Codeception/Event/SuiteEvent.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
39
vendor/codeception/base/src/Codeception/Event/TestEvent.php
vendored
Normal file
39
vendor/codeception/base/src/Codeception/Event/TestEvent.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user