Skip to content

Commit

Permalink
Tests: fix mapping test
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Dec 6, 2024
1 parent 4964e84 commit 0461cff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/Cases/E2E/Database/MappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Tests\Cases\E2E\Database;

use App\Bootstrap;
use App\Model\Database\EntityManagerDecorator;
use Contributte\Tester\Toolkit;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\SchemaValidator;
use Tester\Assert;

Expand All @@ -13,12 +13,13 @@
Toolkit::test(function (): void {
$container = Bootstrap::boot()->createContainer();

/** @var EntityManagerDecorator $em */
$em = $container->getByType(EntityManagerDecorator::class);
/** @var EntityManagerInterface $em */
$em = $container->getByType(EntityManagerInterface::class);

// Validation
$validator = new SchemaValidator($em);
$validations = $validator->validateMapping();

foreach ($validations as $fails) {
foreach ((array) $fails as $fail) {
Assert::fail($fail);
Expand Down

0 comments on commit 0461cff

Please sign in to comment.