-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for interacting with Attribute driver (#36)
No logic changes, but this helps verify there are no weird behaviors when using the attribute driver.
- Loading branch information
Showing
8 changed files
with
74 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Firehed\Mocktrine; | ||
|
||
use Doctrine\ORM\{ | ||
EntityManagerInterface, | ||
Mapping, | ||
}; | ||
|
||
/** | ||
* @covers Firehed\Mocktrine\InMemoryEntityManager | ||
*/ | ||
class AttributeDriverTest extends InMemoryEntityManagerTest | ||
{ | ||
public function setUp(): void | ||
{ | ||
if (version_compare(PHP_VERSION, '8.0.0', '<')) { | ||
$this->markTestSkipped('Attribute tests require PHP8+'); | ||
} | ||
} | ||
|
||
protected function getEntityManager(): InMemoryEntityManager | ||
{ | ||
$driver = new Mapping\Driver\AttributeDriver([__DIR__ . '/Entities']); | ||
return new InMemoryEntityManager($driver); | ||
} | ||
} |
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
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