Esempio n. 1
0
 protected function runSteps()
 {
     foreach ($this->scenario->getSteps() as $step) {
         $action = $step->getAction();
         $arguments = $step->getArguments();
         call_user_func_array(array($this->module, $action), $arguments);
         Stub::update($this->scenario, array('currentStep' => $this->scenario->getCurrentStep() + 1));
     }
 }
Esempio n. 2
0
 public function testUpdate()
 {
     $dummy = Stub::construct('DummyClass');
     Stub::update($dummy, array('checkMe' => 'done'));
     $this->assertEquals('done', $dummy->getCheckMe());
     Stub::update($dummy, array('checkMeToo' => 'done'));
     $this->assertEquals('done', $dummy->getCheckMeToo());
 }