-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for GedmoExtensionsServiceProvider
- Loading branch information
1 parent
3637687
commit d57fa40
Showing
4 changed files
with
55 additions
and
0 deletions.
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
27 changes: 27 additions & 0 deletions
27
tests/Feature/GedmoExtensionsServiceProviderAllMappingsTest.php
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,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\Extensions\Feature; | ||
|
||
use Illuminate\Config\Repository; | ||
use LaravelDoctrine\ORM\DoctrineManager; | ||
use Illuminate\Events\Dispatcher; | ||
Check failure on line 9 in tests/Feature/GedmoExtensionsServiceProviderAllMappingsTest.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
|
||
class GedmoExtensionsServiceProviderAllMappingsTest extends TestCase | ||
{ | ||
protected function defineEnvironment($app) | ||
Check failure on line 13 in tests/Feature/GedmoExtensionsServiceProviderAllMappingsTest.php GitHub Actions / Coding Standards / Coding Standards (8.2)
Check failure on line 13 in tests/Feature/GedmoExtensionsServiceProviderAllMappingsTest.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
{ | ||
// Setup default database to use sqlite :memory: | ||
tap($app['config'], function (Repository $config) { | ||
Check failure on line 16 in tests/Feature/GedmoExtensionsServiceProviderAllMappingsTest.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
$config->set('doctrine.gedmo.all_mappings', true); | ||
}); | ||
} | ||
|
||
public function testCustomExtensionsCanBeRegistered(): void | ||
{ | ||
$this->app['events']->dispatch('doctrine.extensions.booting'); | ||
|
||
$this->assertTrue(true); | ||
} | ||
} |
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,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\Extensions\Feature; | ||
|
||
use LaravelDoctrine\ORM\DoctrineManager; | ||
use Illuminate\Events\Dispatcher; | ||
Check failure on line 8 in tests/Feature/GedmoExtensionsServiceProviderTest.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
|
||
class GedmoExtensionsServiceProviderTest extends TestCase | ||
{ | ||
public function testCustomExtensionsCanBeRegistered(): void | ||
{ | ||
$this->app['events']->dispatch('doctrine.extensions.booting'); | ||
|
||
$this->assertTrue(true); | ||
} | ||
} |
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