Skip to content

Commit

Permalink
NTR - Added doctrine uuid test case
Browse files Browse the repository at this point in the history
  • Loading branch information
cyl3x committed Nov 20, 2024
1 parent 901c73e commit 80fa9a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/integration/DoctrineUuidTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php declare(strict_types=1);

namespace Swag\Braintree\Tests\Integration;

use Swag\Braintree\Entity\ConfigEntity;

class DoctrineUuidTest extends SwagBraintreeTestCase
{
public function test(): void
{
$em = $this->getEntityManager();

$shop = $this->createShop();
$config = (new ConfigEntity())
->setShop($shop);

$em->persist($config);
$em->flush();

static::assertNotNull($config->getId());
$id = clone $config->getId();

$em->persist($config);
$em->flush();

static::assertSame((string) $id, (string) $config->getId());
}
}

0 comments on commit 80fa9a9

Please sign in to comment.