Skip to content
Permalink
Browse files

Merge pull request #22 from ergebnis/fix/split

Fix: Split abstract test cases
  • Loading branch information
localheinz committed Mar 10, 2020
2 parents 6621d3c + dff76af commit 287b0aa787a032bad4946d9c374e34c19452751d
@@ -275,11 +275,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/BasicUsageTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\BasicUsageTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/BasicUsageTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\BasicUsageTest is neither abstract nor final\\.$#"
count: 1
@@ -390,11 +385,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/BidirectionalReferencesTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\BidirectionalReferencesTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/BidirectionalReferencesTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\BidirectionalReferencesTest is neither abstract nor final\\.$#"
count: 1
@@ -430,11 +420,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/ExtraConfigurationTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ExtraConfigurationTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/ExtraConfigurationTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ExtraConfigurationTest is neither abstract nor final\\.$#"
count: 1
@@ -470,11 +455,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/IncorrectUsageTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\IncorrectUsageTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/IncorrectUsageTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\IncorrectUsageTest is neither abstract nor final\\.$#"
count: 1
@@ -520,11 +500,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/PersistingTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\PersistingTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/PersistingTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\PersistingTest is neither abstract nor final\\.$#"
count: 1
@@ -590,11 +565,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/ReferenceTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ReferenceTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/ReferenceTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ReferenceTest is neither abstract nor final\\.$#"
count: 1
@@ -630,11 +600,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/ReferencesTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ReferencesTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/ReferencesTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\ReferencesTest is neither abstract nor final\\.$#"
count: 1
@@ -690,11 +655,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/SequenceTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\SequenceTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/SequenceTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\SequenceTest is neither abstract nor final\\.$#"
count: 1
@@ -730,11 +690,6 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/SingletonTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\SingletonTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/SingletonTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\SingletonTest is neither abstract nor final\\.$#"
count: 1
@@ -780,26 +735,11 @@ parameters:
count: 1
path: test/Doctrine/Fixtures/SingletonTest.php

-
message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#"
count: 1
path: test/Doctrine/Fixtures/TestCase.php

-
message: "#^Parameter \\#1 \\$paths of method Doctrine\\\\ORM\\\\Configuration\\:\\:newDefaultAnnotationDriver\\(\\) expects array, string given\\.$#"
count: 1
path: test/Doctrine/Fixtures/TestCase.php

-
message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#"
count: 1
path: test/Doctrine/Fixtures/TransitiveReferencesTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TransitiveReferencesTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Fixtures/TransitiveReferencesTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TransitiveReferencesTest is neither abstract nor final\\.$#"
count: 1
@@ -1010,3 +950,13 @@ parameters:
count: 1
path: test/Fixture/Entity/SpaceStation.php

-
message: "#^Parameter \\#1 \\$paths of method Doctrine\\\\ORM\\\\Configuration\\:\\:newDefaultAnnotationDriver\\(\\) expects array, string given\\.$#"
count: 1
path: test/Integration/AbstractTestCase.php

-
message: "#^Parameter \\#1 \\$paths of method Doctrine\\\\ORM\\\\Configuration\\:\\:newDefaultAnnotationDriver\\(\\) expects array, string given\\.$#"
count: 1
path: test/Unit/AbstractTestCase.php

@@ -6,6 +6,8 @@ parameters:
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryBot\Definition\AbstractDefinition
- Ergebnis\FactoryBot\Test\Integration\AbstractTestCase
- Ergebnis\FactoryBot\Test\Unit\AbstractTestCase
- InvalidArgumentException
- RuntimeException
inferPrivatePropertyTypeFromConstructor: true
@@ -159,6 +159,23 @@
</MixedMethodCall>
</file>
<file src="test/Doctrine/Fixtures/BasicUsageTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="12">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="12">
<code>acceptsConstantValuesInEntityDefinitions</code>
<code>acceptsGeneratorFunctionsInEntityDefinitions</code>
@@ -205,6 +222,14 @@
</MixedMethodCall>
</file>
<file src="test/Doctrine/Fixtures/BidirectionalReferencesTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="3">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="3">
<code>bidirectionalOntToManyReferencesAreAssignedBothWays</code>
<code>unidirectionalReferencesWorkAsUsual</code>
@@ -226,6 +251,13 @@
</MixedMethodCall>
</file>
<file src="test/Doctrine/Fixtures/ExtraConfigurationTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="2">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="2">
<code>canInvokeACallbackAfterObjectConstruction</code>
<code>theAfterCreateCallbackCanBeUsedToCallTheConstructor</code>
@@ -246,6 +278,17 @@
</MixedOperand>
</file>
<file src="test/Doctrine/Fixtures/IncorrectUsageTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="6">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="6">
<code>throwsWhenTryingToDefineTheSameEntityTwice</code>
<code>throwsWhenTryingToDefineEntitiesThatAreNotEvenClasses</code>
@@ -256,6 +299,14 @@
</MissingReturnType>
</file>
<file src="test/Doctrine/Fixtures/PersistingTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="3">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="3">
<code>automaticPersistCanBeTurnedOn</code>
<code>doesNotPersistByDefault</code>
@@ -275,6 +326,13 @@
</RedundantConditionGivenDocblockType>
</file>
<file src="test/Doctrine/Fixtures/ReferenceTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="2">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="2">
<code>referencedObjectShouldBeCreatedAutomatically</code>
<code>referencedObjectsShouldBeNullable</code>
@@ -294,6 +352,15 @@
<DocblockTypeContradiction occurrences="1">
<code>assertEmpty</code>
</DocblockTypeContradiction>
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="4">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="4">
<code>referencedObjectsShouldBeCreatedAutomatically</code>
<code>referencedObjectsShouldBeOverrideable</code>
@@ -302,6 +369,14 @@
</MissingReturnType>
</file>
<file src="test/Doctrine/Fixtures/SequenceTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="3">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingClosureParamType occurrences="1">
<code>$n</code>
</MissingClosureParamType>
@@ -326,6 +401,17 @@
</MixedMethodCall>
</file>
<file src="test/Doctrine/Fixtures/SingletonTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="6">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="6">
<code>afterGettingAnEntityAsASingletonGettingTheEntityAgainReturnsTheSameObject</code>
<code>getAsSingletonMethodAcceptsFieldOverridesLikeGet</code>
@@ -343,13 +429,14 @@
<code>getName</code>
</MixedMethodCall>
</file>
<file src="test/Doctrine/Fixtures/TestCase.php">
<InvalidArgument occurrences="2">
<code>$annotationPath</code>
<code>$config-&gt;newDefaultAnnotationDriver($annotationPath)</code>
</InvalidArgument>
</file>
<file src="test/Doctrine/Fixtures/TransitiveReferencesTest.php">
<InternalClass occurrences="1">
<code>AbstractTestCase</code>
</InternalClass>
<InternalMethod occurrences="2">
<code>self::createEntityManager()</code>
<code>self::createEntityManager()</code>
</InternalMethod>
<MissingReturnType occurrences="2">
<code>referencesGetInstantiatedTransitively</code>
<code>transitiveReferencesWorkWithSingletons</code>
@@ -417,6 +504,18 @@
<code>getName</code>
</MissingReturnType>
</file>
<file src="test/Integration/AbstractTestCase.php">
<InvalidArgument occurrences="2">
<code>$annotationPath</code>
<code>$config-&gt;newDefaultAnnotationDriver($annotationPath)</code>
</InvalidArgument>
</file>
<file src="test/Unit/AbstractTestCase.php">
<InvalidArgument occurrences="2">
<code>$annotationPath</code>
<code>$config-&gt;newDefaultAnnotationDriver($annotationPath)</code>
</InvalidArgument>
</file>
<file src="test/Unit/Definition/DefinitionsTest.php">
<MixedAssignment occurrences="1">
<code>$definitions</code>
@@ -3,10 +3,11 @@

use Ergebnis\FactoryBot\Test\Fixture\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Ergebnis\FactoryBot\Test\Unit\AbstractTestCase;
use FactoryGirl\Provider\Doctrine\FieldDef;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

class BasicUsageTest extends TestCase
class BasicUsageTest extends AbstractTestCase
{
/**
* @test
@@ -2,10 +2,11 @@
namespace FactoryGirl\Tests\Provider\Doctrine\Fixtures;

use Ergebnis\FactoryBot\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Test\Unit\AbstractTestCase;
use FactoryGirl\Provider\Doctrine\FieldDef;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

class BidirectionalReferencesTest extends TestCase
class BidirectionalReferencesTest extends AbstractTestCase
{
/**
* @test
@@ -2,9 +2,10 @@
namespace FactoryGirl\Tests\Provider\Doctrine\Fixtures;

use Ergebnis\FactoryBot\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Test\Unit\AbstractTestCase;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

class ExtraConfigurationTest extends TestCase
class ExtraConfigurationTest extends AbstractTestCase
{
/**
* @test
@@ -2,9 +2,10 @@
namespace FactoryGirl\Tests\Provider\Doctrine\Fixtures;

use Ergebnis\FactoryBot\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Test\Unit\AbstractTestCase;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

class IncorrectUsageTest extends TestCase
class IncorrectUsageTest extends AbstractTestCase
{
/**
* @test

0 comments on commit 287b0aa

Please sign in to comment.
You can’t perform that action at this time.