Skip to content

Commit

Permalink
Remove useless mock
Browse files Browse the repository at this point in the history
 - this mock didn't work well before because phpunit didn't mock method addDefaultDiscriminatorMap.
 - since phpunit 7.4.0 it throws warning in case of mocking method which is not really mocked (sebastianbergmann/phpunit#3127)
  • Loading branch information
aivus committed Oct 31, 2018
1 parent d81284b commit e65c18e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php
Expand Up @@ -180,15 +180,6 @@ public function testAddDefaultDiscriminatorMap() : void

self::assertEquals($childDiscriminatorMap, $rootDiscriminatorMap);
self::assertEquals($anotherChildDiscriminatorMap, $rootDiscriminatorMap);

// ClassMetadataFactory::addDefaultDiscriminatorMap shouldn't be called again, because the
// discriminator map is already cached
$cmf = $this->getMockBuilder(ClassMetadataFactory::class)->setMethods(['addDefaultDiscriminatorMap'])->getMock();
$cmf->setEntityManager($em);
$cmf->expects($this->never())
->method('addDefaultDiscriminatorMap');

$rootMetadata = $cmf->getMetadataFor(RootClass::class);
}

public function testGetAllMetadataWorksWithBadConnection() : void
Expand Down

0 comments on commit e65c18e

Please sign in to comment.