Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Jan 26, 2024
1 parent 5c159fc commit c6a3232
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Empty file added data/database.sqlite
Empty file.
2 changes: 1 addition & 1 deletion src/Twig/UniqueIdExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class UniqueIdExtension extends AbstractExtension
{
public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction('unique_id', [$this, 'uniqueID']),
Expand Down
11 changes: 7 additions & 4 deletions tests/GedmoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
use App\Entity\Book;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

class GedmoTest extends KernelTestCase
{
protected function setUp(): void{
protected function setUp(): void
{
self::bootKernel();

/** @var EntityManagerInterface $entityManager */
Expand All @@ -16,7 +18,8 @@ protected function setUp(): void{
$entityManager->getConnection()->executeQuery("DELETE FROM book");
}

public function testTimestamp(): void{
public function testTimestamp(): void
{

/** @var EntityManagerInterface $entityManager */
$entityManager = self::getContainer()->get('doctrine.orm.entity_manager');
Expand All @@ -34,6 +37,6 @@ public function testTimestamp(): void{
self::assertNotNull($book->getCreated(), 'The created date should be set by Doctrine Extensions');
self::assertNotNull($book->getUpdated(), 'The updated date should be set by Doctrine Extensions');

}
}

}
}

0 comments on commit c6a3232

Please sign in to comment.