Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForReferenceKeyMismatch PHP Method

createForReferenceKeyMismatch() public static method

public static createForReferenceKeyMismatch ( string $id1, string $id2 ) : InvalidArgumentException
$id1 string
$id2 string
return InvalidArgumentException
    public static function createForReferenceKeyMismatch(string $id1, string $id2) : \InvalidArgumentException
    {
        return new \InvalidArgumentException(sprintf('Reference key mismatch, the keys "%s" and "%s" refers to the same fixture but the keys are different.', $id1, $id2));
    }

Usage Example

 public function testTestCreateForReferenceKeyMismatch()
 {
     $exception = InvalidArgumentExceptionFactory::createForReferenceKeyMismatch('foo', 'bar');
     $this->assertEquals('Reference key mismatch, the keys "foo" and "bar" refers to the same fixture but the keys are different.', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForReferenceKeyMismatch