Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 10 |
Executor | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 10 |
__construct(\Closure $callable, $arguments = array() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
run() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
<?php | |
namespace Codeception\Step; | |
class Executor extends \Codeception\Step { | |
protected $callable = null; | |
public function __construct(\Closure $callable, $arguments = array()) | |
{ | |
// TODO: add serialization to function http://www.htmlist.com/development/extending-php-5-3-closures-with-serialization-and-reflection/ | |
parent::__construct('execute callable function', array()); | |
$this->callable = $callable; | |
} | |
public function run() | |
{ | |
$callable = $this->callable; | |
return $callable(); | |
} | |
} |