diff --git a/composer.json b/composer.json index 035d51d..057c75f 100644 --- a/composer.json +++ b/composer.json @@ -29,20 +29,20 @@ "illuminate/http": "^10.0 || ^11.0", "laravel-doctrine/orm": "^3.0" }, - "suggest": { - "gedmo/doctrine-extensions": "Behavioral Doctrine2 extensions", - "beberlei/doctrineextensions": "Query/Type Doctrine2 extensions (^1.0)" - }, "require-dev": { "beberlei/doctrineextensions": "^1.0", "doctrine/coding-standard": "^12.0", "gedmo/doctrine-extensions": "^2.4 | ^3.0", "laravel/framework": "^10.0 || ^11.0", - "mockery/mockery": "^1.3.1", + "mockery/mockery": "^1.6", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/phpstan": "^1.12", "phpunit/phpunit": "^11.4" }, + "suggest": { + "gedmo/doctrine-extensions": "Behavioral Doctrine2 extensions", + "beberlei/doctrineextensions": "Query/Type Doctrine2 extensions (^1.0)" + }, "autoload": { "psr-4": { "LaravelDoctrine\\Extensions\\": "src/" diff --git a/tests/Feature/BeberleiExtensionsServiceProviderTest.php b/tests/Feature/BeberleiExtensionsServiceProviderTest.php index 960e141..e0ec011 100644 --- a/tests/Feature/BeberleiExtensionsServiceProviderTest.php +++ b/tests/Feature/BeberleiExtensionsServiceProviderTest.php @@ -25,6 +25,8 @@ public function setUp(): void // silence the 'This test did not perform any assertions' warning $this->assertTrue(true); + + parent::setUp(); } public function testCustomFunctionsCanBeRegistered(): void @@ -33,9 +35,4 @@ public function testCustomFunctionsCanBeRegistered(): void $this->provider->boot($this->manager); } - - public function tearDown(): void - { - m::close(); - } } diff --git a/tests/Feature/TestCase.php b/tests/Feature/TestCase.php index 277dfd7..f9151c4 100644 --- a/tests/Feature/TestCase.php +++ b/tests/Feature/TestCase.php @@ -17,9 +17,9 @@ abstract class TestCase extends PHPUnitTestCase public function setUp(): void { $this->evm = m::mock(EventManager::class); - $this->evm->shouldReceive('addEventSubscriber')->once(); + $this->em = m::mock(EntityManagerInterface::class); - $this->em = m::mock(EntityManagerInterface::class); + $this->evm->shouldReceive('addEventSubscriber')->once(); } public function tearDown(): void