File tree 2 files changed +41
-1
lines changed
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,6 @@ protected function registerConsoleCommands(): void
311
311
312
312
protected function shouldRegisterDoctrinePresenceValidator (): bool
313
313
{
314
- return $ this -> app [ ' config ' ]-> get ('doctrine.doctrine_presence_verifier ' , true );
314
+ return config ('doctrine.doctrine_presence_verifier ' , true );
315
315
}
316
316
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace LaravelDoctrineTest \ORM \Feature ;
6
+
7
+ use Doctrine \ORM \Mapping \ClassMetadataFactory ;
8
+ use Doctrine \Persistence \ManagerRegistry ;
9
+ use LaravelDoctrineTest \ORM \TestCase ;
10
+
11
+ class DoctrineServiceProviderTest extends TestCase
12
+ {
13
+ public function testRegistryIsRegistered (): void
14
+ {
15
+ $ registry = $ this ->app ->get ('registry ' );
16
+
17
+ $ this ->assertInstanceOf (
18
+ ManagerRegistry::class,
19
+ $ registry
20
+ );
21
+ }
22
+
23
+ public function testEntityManagerSingleton (): void
24
+ {
25
+ $ em1 = $ this ->app ->get ('em ' );
26
+ $ em2 = $ this ->app ->get ('em ' );
27
+
28
+ $ this ->assertSame ($ em1 , $ em2 );
29
+ }
30
+
31
+ public function testMetaDataFactory (): void
32
+ {
33
+ $ metaDataFactory = $ this ->app ->get (ClassMetadataFactory::class);
34
+
35
+ $ this ->assertInstanceOf (
36
+ ClassMetadataFactory::class,
37
+ $ metaDataFactory
38
+ );
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments