Skip to content
Permalink
Browse files

Merge pull request #17 from ergebnis/fix/move

Fix: Move classes imported from breerly/factory-girl
  • Loading branch information
localheinz committed Mar 10, 2020
2 parents 0f1bfb5 + 82fa52f commit 737027af54e4892e5dd39fd9685b3101ab52bb05
Showing with 1,456 additions and 2,103 deletions.
  1. +3 −6 .github/workflows/integrate.yaml
  2. +5 −1 .php_cs
  3. +3 −4 Makefile
  4. +2 −8 composer.json
  5. +1 −1 infection.json
  6. +78 −668 phpstan-baseline.neon
  7. +82 −260 psalm-baseline.xml
  8. +1 −1 src/Definition/Definition.php
  9. +1 −1 src/Definition/Definitions.php
  10. +0 −16 src/Doctrine/EntityDefinitionUnavailable.php
  11. +0 −10 src/Doctrine/Exception.php
  12. +59 −44 src/{Doctrine → }/EntityDef.php
  13. +25 −0 src/EntityDefinitionUnavailable.php
  14. +21 −0 src/Exception.php
  15. +31 −13 src/{Doctrine → }/FieldDef.php
  16. +96 −58 src/{Doctrine → }/FixtureFactory.php
  17. +3 −5 test/AutoReview/SrcCodeTest.php
  18. +0 −29 test/Doctrine/FixtureFactoryTest.php
  19. +0 −205 test/Doctrine/Fixtures/BasicUsageTest.php
  20. +0 −63 test/Doctrine/Fixtures/BidirectionalReferencesTest.php
  21. +0 −48 test/Doctrine/Fixtures/ExtraConfigurationTest.php
  22. +0 −93 test/Doctrine/Fixtures/IncorrectUsageTest.php
  23. +0 −111 test/Doctrine/Fixtures/PersistingTest.php
  24. +0 −49 test/Doctrine/Fixtures/ReferenceTest.php
  25. +0 −121 test/Doctrine/Fixtures/ReferencesTest.php
  26. +0 −61 test/Doctrine/Fixtures/SequenceTest.php
  27. +0 −103 test/Doctrine/Fixtures/SingletonTest.php
  28. +0 −58 test/Doctrine/Fixtures/TransitiveReferencesTest.php
  29. +0 −35 test/Doctrine/phpunit.xml
  30. +3 −3 test/Fixture/Definition/Acceptable/UserDefinition.php
  31. +3 −3 test/Fixture/Definition/DoesNotImplementInterface/UserDefinition.php
  32. +3 −3 test/Fixture/Definition/ExtendsAbstractDefinition/UserDefinition.php
  33. +3 −3 test/Fixture/Definition/FakerAware/GroupDefinition.php
  34. +3 −3 test/Fixture/Definition/FakerAware/UserDefinition.php
  35. +3 −3 test/Fixture/Definition/IsAbstract/UserDefinition.php
  36. +3 −3 test/Fixture/Definition/PrivateConstructor/UserDefinition.php
  37. +3 −3 test/Fixture/Definition/ThrowsExceptionDuringConstruction/UserDefinition.php
  38. +117 −0 test/Integration/FixtureFactoryTest.php
  39. +188 −0 test/Unit/BasicUsageTest.php
  40. +73 −0 test/Unit/BidirectionalReferencesTest.php
  41. +3 −2 test/Unit/Definition/DefinitionsTest.php
  42. +15 −5 test/{Doctrine → Unit}/EntityDefinitionUnavailableTest.php
  43. +61 −0 test/Unit/ExtraConfigurationTest.php
  44. +40 −0 test/Unit/FixtureFactoryTest.php
  45. +93 −0 test/Unit/IncorrectUsageTest.php
  46. +62 −0 test/Unit/ReferenceTest.php
  47. +126 −0 test/Unit/ReferencesTest.php
  48. +70 −0 test/Unit/SequenceTest.php
  49. +103 −0 test/Unit/SingletonTest.php
  50. +70 −0 test/Unit/TransitiveReferencesTest.php
@@ -9,8 +9,8 @@ on: # yamllint disable-line rule:truthy
- "master"

env:
MIN_COVERED_MSI: 92
MIN_MSI: 70
MIN_COVERED_MSI: 84
MIN_MSI: 53
REQUIRED_PHP_EXTENSIONS: "mbstring"

jobs:
@@ -252,9 +252,6 @@ jobs:
- name: "Run auto-review tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml"

- name: "Run doctrine tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml"

- name: "Run unit tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml"

@@ -309,7 +306,7 @@ jobs:
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml --coverage-clover=.build/logs/clover.xml"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
env:
@@ -26,7 +26,11 @@ $license = License\Type\MIT::markdown(

$license->save();

$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($license->header()));
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($license->header()), [
'final_class' => false,
'mb_str_functions' => false,
'static_lambda' => false,
]);

$config->getFinder()
->ignoreDotFiles(false)
@@ -1,12 +1,12 @@
MIN_COVERED_MSI:=92
MIN_MSI:=70
MIN_COVERED_MSI:=84
MIN_MSI:=53

.PHONY: it
it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets

.PHONY: code-coverage
code-coverage: vendor ## Collects coverage from running unit tests with phpunit/phpunit
vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml --coverage-text
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-text

.PHONY: coding-standards
coding-standards: vendor ## Fixes code style issues with friendsofphp/php-cs-fixer
@@ -46,7 +46,6 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an
tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpunit
mkdir -p .build/phpunit
vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml
vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml

@@ -50,18 +50,12 @@
"autoload": {
"psr-4": {
"Ergebnis\\FactoryBot\\": "src/"
},
"classmap": [
"src/Doctrine/"
]
}
},
"autoload-dev": {
"psr-4": {
"Ergebnis\\FactoryBot\\Test\\": "test/"
},
"classmap": [
"test/Doctrine/"
]
}
},
"support": {
"issues": "https://github.com/ergebnis/factory-bot/issues",
@@ -6,7 +6,7 @@
]
},
"phpUnit": {
"configDir": "test\/Doctrine"
"configDir": "test\/Unit"
},
"logs": {
"text": ".build/infection/infection-log.txt"

0 comments on commit 737027a

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