Scientist\Experiment::run PHP Method

run() public method

Execute the experiment within the laboratory.
public run ( ) : mixed
return mixed
    public function run()
    {
        $this->params = func_get_args();
        return $this->laboratory->runExperiment($this);
    }

Usage Example

Esempio n. 1
0
 public function test_that_running_experiment_with_no_laboratory_executes_control()
 {
     $e = new Experiment('test experiment');
     $e->control(function () {
         return 'foo';
     });
     $v = $e->run();
     $this->assertEquals('foo', $v);
 }