Example #1
0
 /**
  * @param $test
  * @param \PhpSpock\PhpSpock $phpSpock
  * @return mixed | null
  */
 public function run($test, \PhpSpock\PhpSpock $phpSpock)
 {
     try {
         return $phpSpock->run($test);
     } catch (AssertionException $e) {
         throw new \PHPUnit_Framework_ExpectationFailedException($e->getMessage());
     }
 }
Example #2
0
 /**
  * @test
  * @expectedException PhpSpock\Specification\AssertionException
  */
 public function executeTestFromCallback()
 {
     $phpSpock = new PhpSpock();
     $phpSpock->run(array($this, 'mySpec'));
 }