-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb8b148
commit e65f033
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Feature; | ||
|
||
use Doctrine\ORM\Mapping\ClassMetadataFactory; | ||
use Doctrine\Persistence\ManagerRegistry; | ||
use LaravelDoctrineTest\ORM\TestCase; | ||
|
||
class DoctrineServiceProviderTest extends TestCase | ||
{ | ||
public function testRegistryIsRegistered(): void | ||
{ | ||
$registry = $this->app->get('registry'); | ||
|
||
$this->assertInstanceOf( | ||
ManagerRegistry::class, | ||
$registry | ||
); | ||
} | ||
|
||
public function testEntityManagerSingleton(): void | ||
{ | ||
$em1 = $this->app->get('em'); | ||
$em2 = $this->app->get('em'); | ||
|
||
$this->assertSame($em1, $em2); | ||
} | ||
|
||
public function testMetaDataFactory(): void | ||
{ | ||
$metaDataFactory = $this->app->get(ClassMetadataFactory::class); | ||
|
||
$this->assertInstanceOf( | ||
ClassMetadataFactory::class, | ||
$metaDataFactory | ||
); | ||
} | ||
} |