public function testTestCreateException()
 {
     $exception = NoValueForCurrentExceptionFactory::create(new DummyFixture('dummy'));
     $this->assertEquals('No value for \'<current()>\' found for the fixture "dummy".', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function getValueForCurrent()
 {
     if (null === $this->valueForCurrent) {
         throw NoValueForCurrentExceptionFactory::create($this);
     }
     return $this->valueForCurrent;
 }