-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from driehle/upgrade-phpstan
Upgrade PHPStan from 1.12 to 2.0
- Loading branch information
Showing
7 changed files
with
54 additions
and
18 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
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
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
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
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineModuleTest\Persistence; | ||
|
||
use Doctrine\Persistence\ObjectManager; | ||
use DoctrineModuleTest\Persistence\TestAsset\DummyObjectManagerProvider; | ||
use PHPUnit\Framework\TestCase as BaseTestCase; | ||
|
||
/** | ||
* Test for {@see \DoctrineModule\Persistence\ProvidesObjectManager} | ||
*/ | ||
class ProvidesObjectManagerTest extends BaseTestCase | ||
{ | ||
public function testSetAndGetObjectManager(): void | ||
{ | ||
$objectManager = $this->createMock(ObjectManager::class); | ||
$dummy = new DummyObjectManagerProvider(); | ||
$dummy->setObjectManager($objectManager); | ||
$retrieved = $dummy->getObjectManager(); | ||
|
||
$this->assertSame($objectManager, $retrieved); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/Persistence/TestAsset/DummyObjectManagerProvider.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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineModuleTest\Persistence\TestAsset; | ||
|
||
use DoctrineModule\Persistence\ProvidesObjectManager; | ||
|
||
class DummyObjectManagerProvider | ||
{ | ||
use ProvidesObjectManager; | ||
} |
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