55namespace Symplify \PHPStanRules \Tests \Rules \Doctrine \NoDocumentMockingRule ;
66
77use Iterator ;
8+ <<<<<<< HEAD
89use Override;
910use PHPStan \Rules \Rule ;
1011use PHPStan \Testing \RuleTestCase ;
1112use PHPUnit \Framework \Attributes \DataProvider ;
1213use Symplify \PHPStanRules \Rules \Doctrine \NoDocumentMockingRule ;
14+ =======
15+ use PHPStan \Reflection \ReflectionProvider ;
16+ use PHPStan \Rules \Rule ;
17+ use PHPStan \Testing \RuleTestCase ;
18+ use PHPUnit \Framework \Attributes \DataProvider ;
19+ use Symplify \PHPStanRules \Rules \Doctrine \NoGetRepositoryOnServiceRepositoryEntityRule ;
20+ use Symplify \PHPStanRules \Tests \Rules \Doctrine \NoGetRepositoryOnServiceRepositoryEntityRule \Source \Repository \SomeServiceRepository ;
21+ >>>>>>> 0 ffdc220 (add test)
1322
1423final class NoDocumentMockingRuleTest extends RuleTestCase
1524{
@@ -27,14 +36,21 @@ public function testRule(string $filePath, array $expectedErrorMessagesWithLines
2736 */
2837 public static function provideData(): Iterator
2938 {
39+ <<<<<<< HEAD
3040 yield [__DIR__ . '/Fixture/SomeEntityMocking.php ' , [[
3141 NoDocumentMockingRule::ERROR_MESSAGE ,
42+ =======
43+ $ errorMessage = sprintf (NoGetRepositoryOnServiceRepositoryEntityRule::ERROR_MESSAGE , 'SomeEntity ' , SomeServiceRepository::class);
44+ yield [__DIR__ . '/Fixture/SomeEntityMocking.php ' , [[
45+ $ errorMessage ,
46+ >>>>>>> 0 ffdc220 (add test)
3247 14 ,
3348 ]]];
3449
3550 yield [__DIR__ . '/Fixture/SomeAbstractEntityMocking.php ' , []];
3651 }
3752
53+ <<<<<<< HEAD
3854 /**
3955 * @return string[]
4056 */
@@ -47,5 +63,12 @@ public static function getAdditionalConfigFiles(): array
4763 protected function getRule (): Rule
4864 {
4965 return self ::getContainer ()->getByType (NoDocumentMockingRule::class);
66+ =======
67+ protected function getRule (): Rule
68+ {
69+ $ reflectionProvider = self ::getContainer ()->getByType (ReflectionProvider::class);
70+
71+ return new NoGetRepositoryOnServiceRepositoryEntityRule ($ reflectionProvider );
72+ >>>>>>> 0 ffdc220 (add test)
5073 }
5174}
0 commit comments