コード例 #1
0
 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());
 }
コード例 #2
0
ファイル: SimpleFixture.php プロジェクト: nelmio/alice
 /**
  * @inheritdoc
  */
 public function getValueForCurrent()
 {
     if (null === $this->valueForCurrent) {
         throw NoValueForCurrentExceptionFactory::create($this);
     }
     return $this->valueForCurrent;
 }