for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SmartWeb\ModuleTesting;
use Codeception\Scenario;
use Codeception\Step;
use ReflectionClass;
use SmartWeb\ModuleTesting\Contracts\Test\CodeceptionCest;
use SmartWeb\ModuleTesting\Util\BacksUpItems;
use SmartWeb\ModuleTesting\Util\WithMockery;
/**
* Class BaseCodeceptionCest
*
* @package SmartWeb\ModuleTesting
*/
abstract class BaseCodeceptionCest implements CodeceptionCest
{
use WithMockery, BacksUpItems;
* @var Scenario
protected $scenario;
* @var Step
protected $step;
// region <<-[ Codeception hooks ]->>
* @inheritDoc
public function _initialize()
}
public function _cleanup()
public function _beforeSuite(array $settings = [])
$this->getCopier();
public function _afterSuite()
public function _beforeStep(Step $step)
$this->step = $step;
public function _afterStep(Step $step)
unset($step);
// endregion [ Codeception hooks ]
* @return Scenario
protected function getScenario() : Scenario
return $this->scenario;
* @return Step
protected function getStep() : Step
return $this->step;
* @return object
final protected function getTesterAttribute()
$reflectionClass = new ReflectionClass($this->getActorClass());
return $reflectionClass->newInstance($this->scenario);
// FIXME: Is there not a better way to dynamically create the correct actor class from here?
* @return string
abstract protected function getActorClass() : string;