-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
89 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
cacheDirectory=".phpunit.cache"> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
<server name="KERNEL_CLASS" value="Zenstruck\Foundry\Tests\Fixture\TestKernel"/> | ||
<server name="SHELL_VERBOSITY" value="-1"/> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="zenstruck/foundry Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<source ignoreSuppressionOfDeprecations="true"> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</source> | ||
<extensions> | ||
<bootstrap class="Zenstruck\Foundry\PHPUnit\FoundryExtension" /> | ||
<bootstrap class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" /> | ||
</extensions> | ||
</phpunit> |
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
|
||
use PHPUnit\Framework\Attributes\RequiresPhpunit; | ||
use PHPUnit\Framework\Attributes\RequiresPhpunitExtension; | ||
use PHPUnit\Framework\Attributes\Test; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
use Zenstruck\Foundry\Attribute\WithStory; | ||
use Zenstruck\Foundry\PHPUnit\FoundryExtension; | ||
|
@@ -27,9 +28,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11 | ||
* @requires PHPUnit ^11.0 | ||
*/ | ||
#[RequiresPhpunit('11')] | ||
#[RequiresPhpunit('^11.0')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
#[WithStory(EntityStory::class)] | ||
final class WithStoryOnClassTest extends KernelTestCase | ||
|
@@ -39,6 +40,7 @@ final class WithStoryOnClassTest extends KernelTestCase | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
public function can_use_story_in_attribute(): void | ||
{ | ||
GenericEntityFactory::assert()->count(2); | ||
|
@@ -50,6 +52,7 @@ public function can_use_story_in_attribute(): void | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
#[WithStory(EntityStory::class)] | ||
public function can_use_story_in_attribute_multiple_times(): void | ||
{ | ||
|
@@ -59,6 +62,7 @@ public function can_use_story_in_attribute_multiple_times(): void | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
#[WithStory(EntityPoolStory::class)] | ||
public function can_use_another_story_at_level_class(): void | ||
{ | ||
|
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
|
||
use PHPUnit\Framework\Attributes\RequiresPhpunit; | ||
use PHPUnit\Framework\Attributes\RequiresPhpunitExtension; | ||
use PHPUnit\Framework\Attributes\Test; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
use Zenstruck\Foundry\Attribute\WithStory; | ||
use Zenstruck\Foundry\PHPUnit\FoundryExtension; | ||
|
@@ -28,9 +29,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11 | ||
* @requires PHPUnit ^11.0 | ||
*/ | ||
#[RequiresPhpunit('11')] | ||
#[RequiresPhpunit('^11.0')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class WithStoryOnMethodTest extends KernelTestCase | ||
{ | ||
|
@@ -39,6 +40,7 @@ final class WithStoryOnMethodTest extends KernelTestCase | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
#[WithStory(EntityStory::class)] | ||
public function can_use_story_in_attribute(): void | ||
{ | ||
|
@@ -51,6 +53,7 @@ public function can_use_story_in_attribute(): void | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
#[WithStory(EntityStory::class)] | ||
#[WithStory(EntityPoolStory::class)] | ||
public function can_use_multiple_story_in_attribute(): void | ||
|
@@ -61,6 +64,7 @@ public function can_use_multiple_story_in_attribute(): void | |
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
#[WithStory(ServiceStory::class)] | ||
public function can_use_service_story(): void | ||
{ | ||
|
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 |
---|---|---|
|
@@ -15,23 +15,25 @@ | |
|
||
use PHPUnit\Framework\Attributes\RequiresPhpunit; | ||
use PHPUnit\Framework\Attributes\RequiresPhpunitExtension; | ||
use PHPUnit\Framework\Attributes\Test; | ||
use Zenstruck\Foundry\Attribute\WithStory; | ||
use Zenstruck\Foundry\PHPUnit\FoundryExtension; | ||
use Zenstruck\Foundry\Tests\Fixture\Factories\Entity\GenericEntityFactory; | ||
use Zenstruck\Foundry\Tests\Fixture\Stories\EntityPoolStory; | ||
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11 | ||
* @requires PHPUnit ^11.0 | ||
*/ | ||
#[RequiresPhpunit('11')] | ||
#[RequiresPhpunit('^11.0')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
#[WithStory(EntityPoolStory::class)] | ||
final class WithStoryOnParentClassTest extends ParentClassWithStoryAttributeTestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
#[Test] | ||
public function can_use_story_in_attribute_from_parent_class(): void | ||
{ | ||
GenericEntityFactory::assert()->count(5); | ||
|
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 |
---|---|---|
|
@@ -28,9 +28,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class DataProviderForServiceFactoryInKernelTestCaseTest extends KernelTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -33,9 +33,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class DataProviderInUnitTest extends TestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -25,9 +25,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class DataProviderWithNonProxyFactoryInKernelTestCaseTest extends KernelTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -29,9 +29,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
abstract class DataProviderWithProxyFactoryInKernelTestCase extends KernelTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -19,9 +19,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class GenericDocumentProxyFactoryTest extends DataProviderWithProxyFactoryInKernelTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -19,9 +19,9 @@ | |
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* @requires PHPUnit 11.4 | ||
* @requires PHPUnit ^11.4 | ||
*/ | ||
#[RequiresPhpunit('11.4')] | ||
#[RequiresPhpunit('^11.4')] | ||
#[RequiresPhpunitExtension(FoundryExtension::class)] | ||
final class GenericEntityProxyFactoryTest extends DataProviderWithProxyFactoryInKernelTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
/** | ||
* @author Kevin Bond <[email protected]> | ||
* @group maker | ||
* @requires PHP 8.1 | ||
*/ | ||
final class MakeStoryTest extends MakerTestCase | ||
{ | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
/** | ||
* @author Kevin Bond <[email protected]> | ||
* @group maker | ||
* @requires PHP 8.1 | ||
*/ | ||
abstract class MakerTestCase extends KernelTestCase | ||
{ | ||
|