Skip to content

Commit

Permalink
Merge branch '4.4' into 5.2
Browse files Browse the repository at this point in the history
* 4.4:
  Use createMock() instead of a getter
  [ErrorHandler] Fix strpos error when trying to call a method without a name
  use proper keys to not override appended files
  Fix console logger according to PSR-3
  • Loading branch information
jderusse committed Jan 28, 2021
2 parents c2c234d + 6a57cde commit d83d2a9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Tests/Mapping/Loader/FilesLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class FilesLoaderTest extends TestCase
{
public function testCallsGetFileLoaderInstanceForeachPath()
{
$loader = $this->getFilesLoader($this->getFileLoader());
$loader = $this->getFilesLoader($this->createMock(LoaderInterface::class));
$this->assertEquals(4, $loader->getTimesCalled());
}

public function testCallsActualFileLoaderForMetadata()
{
$fileLoader = $this->getFileLoader();
$fileLoader = $this->createMock(LoaderInterface::class);
$fileLoader->expects($this->exactly(4))
->method('loadClassMetadata');
$loader = $this->getFilesLoader($fileLoader);
Expand All @@ -43,9 +43,4 @@ public function getFilesLoader(LoaderInterface $loader)
__DIR__.'/constraint-mapping.txt',
], $loader]);
}

public function getFileLoader()
{
return $this->createMock(LoaderInterface::class);
}
}

0 comments on commit d83d2a9

Please sign in to comment.