Doctrine\Tests\Common\DataFixtures\ReferenceRepositoryTest::testThrowsExceptionAddingDuplicatedReference PHP Method

testThrowsExceptionAddingDuplicatedReference() public method

    public function testThrowsExceptionAddingDuplicatedReference()
    {
        $referenceRepository = new ReferenceRepository($this->getMockSqliteEntityManager());
        $referenceRepository->addReference('duplicated_reference', new \stdClass());
        $this->expectException(\BadMethodCallException::class);
        $this->expectExceptionMessage('Reference to: (duplicated_reference) already exists, use method setReference in order to override it');
        $referenceRepository->addReference('duplicated_reference', new \stdClass());
    }