Skip to content

Commit 6a57cde

Browse files
OskarStarkchalasr
authored andcommitted
Use createMock() instead of a getter
1 parent 0394791 commit 6a57cde

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Tests/Mapping/Loader/FilesLoaderTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ class FilesLoaderTest extends TestCase
2020
{
2121
public function testCallsGetFileLoaderInstanceForeachPath()
2222
{
23-
$loader = $this->getFilesLoader($this->getFileLoader());
23+
$loader = $this->getFilesLoader($this->createMock(LoaderInterface::class));
2424
$this->assertEquals(4, $loader->getTimesCalled());
2525
}
2626

2727
public function testCallsActualFileLoaderForMetadata()
2828
{
29-
$fileLoader = $this->getFileLoader();
29+
$fileLoader = $this->createMock(LoaderInterface::class);
3030
$fileLoader->expects($this->exactly(4))
3131
->method('loadClassMetadata');
3232
$loader = $this->getFilesLoader($fileLoader);
@@ -42,9 +42,4 @@ public function getFilesLoader(LoaderInterface $loader)
4242
__DIR__.'/constraint-mapping.txt',
4343
], $loader]);
4444
}
45-
46-
public function getFileLoader()
47-
{
48-
return $this->createMock(LoaderInterface::class);
49-
}
5045
}

0 commit comments

Comments
 (0)