Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running tests while trying to start contribuiting on the project #813

Open
mnofresno opened this issue Apr 10, 2022 · 9 comments
Open

Comments

@mnofresno
Copy link

mnofresno commented Apr 10, 2022

Hi! I have read the documentation for contribuiting https://php-di.org/contributing.html and followed them step-by-step, but I've stall at the "Run tests" part.

Because when I ran phpunit, this errror arises:

~/PHP-DI (master) $ phpunit
PHP Fatal error:  Trait 'EasyMock\EasyMock' not found in /home/mariano/PHP-DI/tests/UnitTest/ContainerBuilderTest.php on line 24
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit-7.1.phar:0
PHP   2. PHPUnit\TextUI\Command::main() /usr/bin/phpunit-7.1.phar:588
PHP   3. PHPUnit\TextUI\Command->run() phar:///usr/bin/phpunit-7.1.phar/phpunit/TextUI/Command.php:151
PHP   4. PHPUnit\TextUI\Command->handleArguments() phar:///usr/bin/phpunit-7.1.phar/phpunit/TextUI/Command.php:162
PHP   5. PHPUnit\Util\Configuration->getTestSuiteConfiguration() phar:///usr/bin/phpunit-7.1.phar/phpunit/TextUI/Command.php:839
PHP   6. PHPUnit\Util\Configuration->getTestSuite() phar:///usr/bin/phpunit-7.1.phar/phpunit/Util/Configuration.php:924
PHP   7. PHPUnit\Framework\TestSuite->addTestFiles() phar:///usr/bin/phpunit-7.1.phar/phpunit/Util/Configuration.php:1016
PHP   8. PHPUnit\Framework\TestSuite->addTestFile() phar:///usr/bin/phpunit-7.1.phar/phpunit/Framework/TestSuite.php:636
PHP   9. PHPUnit\Util\FileLoader::checkAndLoad() phar:///usr/bin/phpunit-7.1.phar/phpunit/Framework/TestSuite.php:558
PHP  10. PHPUnit\Util\FileLoader::load() phar:///usr/bin/phpunit-7.1.phar/phpunit/Util/FileLoader.php:45
PHP  11. include_once() phar:///usr/bin/phpunit-7.1.phar/phpunit/Util/FileLoader.php:57
@mnofresno
Copy link
Author

More info:

Before I've ran phpunit, I've ran composer install and this is the result of the command:

$ composer install 
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - ocramius/proxy-manager[2.2.0, ..., 2.2.4] require ocramius/package-versions ^1.1.3 -> satisfiable by ocramius/package-versions[1.1.3, ..., 1.11.0].
    - ocramius/proxy-manager[2.1.0, ..., 2.1.1] require ocramius/package-versions ^1.1.1 -> satisfiable by ocramius/package-versions[1.1.1, ..., 1.11.0].
    - ocramius/proxy-manager[2.0.2, ..., 2.0.4] require ocramius/package-versions ^1.0 -> satisfiable by ocramius/package-versions[1.0.0, ..., 1.11.0].
    - ocramius/package-versions[1.0.0, ..., 1.2.0] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - ocramius/proxy-manager[2.3.0, ..., 2.5.3] require php ^7.4.0 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/package-versions[1.6.0, ..., 1.9.0] require php ^7.4.0 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/package-versions[1.3.0, ..., 1.4.2] require composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - ocramius/package-versions[1.5.0, ..., 1.5.1] require php ^7.3.0 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/proxy-manager[2.6.0, ..., 2.7.0] require php 7.4.* -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/proxy-manager[2.7.1, ..., 2.7.2] require php 7.4.0 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/package-versions[1.10.0, ..., 1.11.0] require php ^7.4.7 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/proxy-manager[2.8.0, ..., 2.10.2] require php ~7.4.1 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/proxy-manager[2.11.0, ..., 2.13.1] require php ~7.4.1 || ~8.0.0 -> your php version (7.2.24) does not satisfy that requirement.
    - ocramius/proxy-manager[2.14.0, ..., 2.14.1] require php ~8.0.0 -> your php version (7.2.24) does not satisfy that requirement.
    - Root composer.json requires ocramius/proxy-manager ^2.0.2 -> satisfiable by ocramius/proxy-manager[2.0.2, ..., 2.14.1].

ocramius/package-versions only provides support for Composer 2 in 1.8+, which requires PHP 7.4.
If you can not upgrade PHP you can require composer/package-versions-deprecated to resolve this with PHP 7.0+.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

@SvenRtbg
Copy link
Contributor

ocramius/proxy-manager[2.3.0, ..., 2.5.3] require php ^7.4.0 -> your php version (7.2.24) does not satisfy that requirement.

Upgrade to at least PHP 7.4 to contribute. Also, your PHPUnit seems out of date when running the tests, but that blame goes to the documentation that is not explicitly specifying you are supposed to run the phpunit version installed via Composer. So running it would require vendor/bin/phpunit instead of just phpunit (the latter runs whatever you may have installed in your path, which is version 7.1.x instead of 9.4+).

@mnofresno
Copy link
Author

mnofresno commented Apr 10, 2022

Oh! thanks SvenRtbg for your research & reply!! I've updated to PHP 7.4 and currently phpunit works just fine.

BUT, all this errors when running php unit appears to be from broken tests, ¿is this normal or is my environment still a little broken?

$ vendor/bin/phpunit 
PHPUnit 9.5.20 #StandWithUkraine

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

............SS.................................................  63 / 667 (  9%)
............................................................... 126 / 667 ( 18%)
............................................................... 189 / 667 ( 28%)
..........SSSSS.........................................SSS.... 252 / 667 ( 37%)
............E....................................W............. 315 / 667 ( 47%)
............................................................... 378 / 667 ( 56%)
............................................................... 441 / 667 ( 66%)
............................................................... 504 / 667 ( 75%)
............................................................... 567 / 667 ( 85%)
.S............................................................. 630 / 667 ( 94%)
.....................................                           667 / 667 (100%)

Time: 00:02.256, Memory: 22.00 MB

There was 1 error:

1) DI\Test\IntegrationTest\CompiledContainerTest::proxy_classes_can_be_pregenerated_at_compile_time
ProxyManager\Exception\FileNotWritableException: Could not move file "/home/mariano/PHP-DI/tests/IntegrationTest/tmp/wswTrZc3e" to location "/home/mariano/PHP-DI/tests/IntegrationTest/tmp/ProxyManagerGeneratedProxy__PM__DITestIntegrationTestCompiledContainerTestConstructorWithAbstractClassTypehintGenerated93f9de0d54be660fc33d146f2b2ca727.php": either the source file is not readable, or the destination is not writable

/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Exception/FileNotWritableException.php:44
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/FileWriterGeneratorStrategy.php:54
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/AbstractBaseFactory.php:120
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/AbstractBaseFactory.php:79
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/LazyLoadingValueHolderFactory.php:52
/home/mariano/PHP-DI/src/Proxy/ProxyFactory.php:60
/home/mariano/PHP-DI/src/Proxy/ProxyFactory.php:74
/home/mariano/PHP-DI/src/Compiler/ObjectCreationCompiler.php:140
/home/mariano/PHP-DI/src/Compiler/ObjectCreationCompiler.php:39
/home/mariano/PHP-DI/src/Compiler/Compiler.php:268
/home/mariano/PHP-DI/src/Compiler/Compiler.php:160
/home/mariano/PHP-DI/src/ContainerBuilder.php:182
/home/mariano/PHP-DI/tests/IntegrationTest/CompiledContainerTest.php:172

Caused by
Webimpress\SafeWriter\Exception\RenameException: Could not move file "/home/mariano/PHP-DI/tests/IntegrationTest/tmp/wswTrZc3e" to location "/home/mariano/PHP-DI/tests/IntegrationTest/tmp/ProxyManagerGeneratedProxy__PM__DITestIntegrationTestCompiledContainerTestConstructorWithAbstractClassTypehintGenerated93f9de0d54be660fc33d146f2b2ca727.php": either the source file is not readable, or the destination is not writable

/home/mariano/PHP-DI/vendor/webimpress/safe-writer/src/Exception/RenameException.php:28
/home/mariano/PHP-DI/vendor/webimpress/safe-writer/src/FileWriter.php:66
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/FileWriterGeneratorStrategy.php:50
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/AbstractBaseFactory.php:120
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/AbstractBaseFactory.php:79
/home/mariano/PHP-DI/vendor/ocramius/proxy-manager/src/ProxyManager/Factory/LazyLoadingValueHolderFactory.php:52
/home/mariano/PHP-DI/src/Proxy/ProxyFactory.php:60
/home/mariano/PHP-DI/src/Proxy/ProxyFactory.php:74
/home/mariano/PHP-DI/src/Compiler/ObjectCreationCompiler.php:140
/home/mariano/PHP-DI/src/Compiler/ObjectCreationCompiler.php:39
/home/mariano/PHP-DI/src/Compiler/Compiler.php:268
/home/mariano/PHP-DI/src/Compiler/Compiler.php:160
/home/mariano/PHP-DI/src/ContainerBuilder.php:182
/home/mariano/PHP-DI/tests/IntegrationTest/CompiledContainerTest.php:172

--

There was 1 warning:

1) DI\Test\IntegrationTest\ContainerDebugTest::testEntriesDefinitions
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

ERRORS!
Tests: 667, Assertions: 1446, Errors: 1, Warnings: 1, Skipped: 11.

@SvenRtbg
Copy link
Contributor

SvenRtbg commented Apr 10, 2022 via email

@mnofresno
Copy link
Author

Oh, Accidentally I've posted the old call, but later I've fixed it, see again that the prompt says I'm using PHPUnit 9.5.20 instead of my original PHPUnit 7.1.5 but some errors still appear

@mnofresno
Copy link
Author

mnofresno commented Apr 10, 2022

The output states:

PHPUnit 9.5.20
....
Tests: 667, Assertions: 1446, Errors: 1, Warnings: 1, Skipped: 11.

Is that normal?

@mnapoli
Copy link
Member

mnapoli commented Apr 11, 2022

That is weird that you got an error, seems like a failure you can ignore (sadly, I have no explanation). All the other (skipped and warning) are OK.

@SvenRtbg
Copy link
Contributor

SvenRtbg commented Apr 11, 2022 via email

@alexandrmazur96
Copy link

alexandrmazur96 commented Jan 2, 2024

UPD. nevermind, root of problem was in windows line separator

It seems the problem with tests still exists, but I have more errors here on the fresh project master branch.

WSL2, PHP8.1

php vendor/bin/phpunit                                                                                                                                                                                             at 17:29:05
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

..........SS.......................FFF....FFFFFFFFFFFF.FFFF....  63 / 665 (  9%)
............................................................... 126 / 665 ( 18%)
...................FFF......................................... 189 / 665 ( 28%)
..........SSSSS.........................................SSS.... 252 / 665 ( 37%)
..............F................................................ 315 / 665 ( 47%)
............................................................... 378 / 665 ( 56%)
............................................................... 441 / 665 ( 66%)
............................................................... 504 / 665 ( 75%)
..............................................................S 567 / 665 ( 85%)
.................................................FFFFFF......FF 630 / 665 ( 94%)
...................................                             665 / 665 (100%)

Time: 00:00.088, Memory: 22.00 MB

There were 31 failures:

1) DI\Test\UnitTest\Definition\ArrayDefinitionTest::should_cast_to_string
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[\r\n
-    0 => 'hello',\r\n
-    1 => 'world',\r\n
+'[\n
+    0 => 'hello',\n
+    1 => 'world',\n
 ]'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/ArrayDefinitionTest.php:40

2) DI\Test\UnitTest\Definition\ArrayDefinitionTest::should_cast_to_string_with_string_keys
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[\r\n
-    'test' => 'hello',\r\n
+'[\n
+    'test' => 'hello',\n
 ]'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/ArrayDefinitionTest.php:51

3) DI\Test\UnitTest\Definition\ArrayDefinitionTest::should_cast_to_string_with_nested_definitions
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[\r\n
-    0 => get(foo),\r\n
-    1 => Environment variable (\r\n
-        variable = foo\r\n
-        optional = no\r\n
-    ),\r\n
+'[\n
+    0 => get(foo),\n
+    1 => Environment variable (\n
+        variable = foo\n
+        optional = no\n
+    ),\n
 ]'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/ArrayDefinitionTest.php:70

4) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testAll
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = true\r\n
-    __construct(\r\n
-        $mailer = get(Mailer)\r\n
-        $contactEmail = '[email protected]'\r\n
-    )\r\n
-    $prop = 'Some value'\r\n
-    setFoo(\r\n
-        $foo = get(SomeDependency)\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = true\n
+    __construct(\n
+        $mailer = get(Mailer)\n
+        $contactEmail = '[email protected]'\n
+    )\n
+    $prop = 'Some value'\n
+    setFoo(\n
+        $foo = get(SomeDependency)\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:38

5) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testClass
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:53

6) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testNonExistentClass
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = #UNKNOWN# foobar\r\n
-    lazy = false\r\n
+'Object (\n
+    class = #UNKNOWN# foobar\n
+    lazy = false\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:69

7) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testNonInstantiableClass
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = #NOT INSTANTIABLE# ArrayAccess\r\n
-    lazy = false\r\n
+'Object (\n
+    class = #NOT INSTANTIABLE# ArrayAccess\n
+    lazy = false\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:84

8) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testLazy
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = stdClass\r\n
-    lazy = true\r\n
+'Object (\n
+    class = stdClass\n
+    lazy = true\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:100

9) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testConstructorParameters
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    __construct(\r\n
-        $mailer = get(Mailer)\r\n
-        $contactEmail = '[email protected]'\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    __construct(\n
+        $mailer = get(Mailer)\n
+        $contactEmail = '[email protected]'\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:120

10) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testUndefinedConstructorParameter
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    __construct(\r\n
-        $mailer = get(Mailer)\r\n
-        $contactEmail = #UNDEFINED#\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    __construct(\n
+        $mailer = get(Mailer)\n
+        $contactEmail = #UNDEFINED#\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:140

11) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testPropertyValue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    $prop = 'Some value'\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    $prop = 'Some value'\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:157

12) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testPropertyGet
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    $prop = get(foo)\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    $prop = get(foo)\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:174

13) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testMethodLinkParameter
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    setFoo(\r\n
-        $foo = get(Mailer)\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    setFoo(\n
+        $foo = get(Mailer)\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:193

14) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testMethodValueParameter
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    setFoo(\r\n
-        $foo = 'foo'\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    setFoo(\n
+        $foo = 'foo'\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:212

15) DI\Test\UnitTest\Definition\Dumper\ObjectDefinitionDumperTest::testMethodDefaultParameterValue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Object (\r\n
-    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\r\n
-    lazy = false\r\n
-    defaultValue(\r\n
-        $foo = (default value) 'bar'\r\n
-    )\r\n
+'Object (\n
+    class = DI\Test\UnitTest\Definition\Dumper\FixtureClass\n
+    lazy = false\n
+    defaultValue(\n
+        $foo = (default value) 'bar'\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/Dumper/ObjectDefinitionDumperTest.php:231

16) DI\Test\UnitTest\Definition\EnvironmentVariableDefinitionTest::should_cast_to_string
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Environment variable (\r\n
-    variable = bar\r\n
-    optional = no\r\n
+'Environment variable (\n
+    variable = bar\n
+    optional = no\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/EnvironmentVariableDefinitionTest.php:35

17) DI\Test\UnitTest\Definition\EnvironmentVariableDefinitionTest::should_cast_to_string_with_default_value
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Environment variable (\r\n
-    variable = bar\r\n
-    optional = yes\r\n
-    default = '<default>'\r\n
+'Environment variable (\n
+    variable = bar\n
+    optional = yes\n
+    default = '<default>'\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/EnvironmentVariableDefinitionTest.php:48

18) DI\Test\UnitTest\Definition\EnvironmentVariableDefinitionTest::should_cast_to_string_with_reference_as_default_value
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Environment variable (\r\n
-    variable = bar\r\n
-    optional = yes\r\n
-    default = get(foo)\r\n
+'Environment variable (\n
+    variable = bar\n
+    optional = yes\n
+    default = get(foo)\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/EnvironmentVariableDefinitionTest.php:61

19) DI\Test\UnitTest\Definition\EnvironmentVariableDefinitionTest::should_cast_to_string_with_nested_definition_as_default_value
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Environment variable (\r\n
-    variable = bar\r\n
-    optional = yes\r\n
-    default = Environment variable (\r\n
-        variable = foo\r\n
-        optional = no\r\n
-    )\r\n
+'Environment variable (\n
+    variable = bar\n
+    optional = yes\n
+    default = Environment variable (\n
+        variable = foo\n
+        optional = no\n
+    )\n
 )'

/home/username/projects/PHP-DI/tests/UnitTest/Definition/EnvironmentVariableDefinitionTest.php:77

20) DI\Test\UnitTest\Definition\Resolver\ObjectCreatorTest::testUnknownClass
Failed asserting that exception message 'Entry "foo" cannot be resolved: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# bar
    lazy = false
)' contains 'Entry "foo" cannot be resolved: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# bar
    lazy = false
)'.

21) DI\Test\UnitTest\Definition\Resolver\ObjectCreatorTest::testNotInstantiable
Failed asserting that exception message 'Entry "ArrayAccess" cannot be resolved: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# ArrayAccess
    lazy = false
)' contains 'Entry "ArrayAccess" cannot be resolved: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# ArrayAccess
    lazy = false
)'.

22) DI\Test\UnitTest\Definition\Resolver\ObjectCreatorTest::testUndefinedInjection
Failed asserting that exception message 'Entry "DI\Test\UnitTest\Definition\Resolver\Fixture\FixtureClass" cannot be resolved: Parameter $param1 of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\UnitTest\Definition\Resolver\Fixture\FixtureClass
    lazy = false
)' contains 'Entry "DI\Test\UnitTest\Definition\Resolver\Fixture\FixtureClass" cannot be resolved: Parameter $param1 of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\UnitTest\Definition\Resolver\Fixture\FixtureClass
    lazy = false
)'.

23) DI\Test\IntegrationTest\CompiledContainerTest::invalid_definitions_referenced_in_the_configuration_throw_an_error
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\CompiledContainerTest\AbstractClass" cannot be compiled: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\CompiledContainerTest\AbstractClass
    lazy = false
)' contains 'Entry "DI\Test\IntegrationTest\CompiledContainerTest\AbstractClass" cannot be compiled: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\CompiledContainerTest\AbstractClass
    lazy = false
)'.

24) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_non_instantiable_class with data set "not-compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture" cannot be resolved: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture
    lazy = false
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture" cannot be resolved: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture
    lazy = false
)'.

25) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_non_instantiable_class with data set "compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture" cannot be compiled: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture
    lazy = false
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture" cannot be compiled: the class is not instantiable
Full definition:
Object (
    class = #NOT INSTANTIABLE# DI\Test\IntegrationTest\ErrorMessages\InterfaceFixture
    lazy = false
)'.

26) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_non_existent_class with data set "not-compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "Acme\Foo\Bar\Bar" cannot be resolved: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# Acme\Foo\Bar\Bar
    lazy = false
)' contains 'Entry "Acme\Foo\Bar\Bar" cannot be resolved: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# Acme\Foo\Bar\Bar
    lazy = false
)'.

27) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_non_existent_class with data set "compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "Acme\Foo\Bar\Bar" cannot be compiled: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# Acme\Foo\Bar\Bar
    lazy = false
)' contains 'Entry "Acme\Foo\Bar\Bar" cannot be compiled: the class doesn't exist
Full definition:
Object (
    class = #UNKNOWN# Acme\Foo\Bar\Bar
    lazy = false
)'.

28) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_undefined_constructor_parameter with data set "not-compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy1" cannot be resolved: Parameter $bar of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy1
    lazy = false
    __construct(
        $foo = 'some value'
        $bar = #UNDEFINED#
        $default = (default value) 123
    )
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy1" cannot be resolved: Parameter $bar of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy1
    lazy = false
    __construct(
        $foo = 'some value'
        $bar = #UNDEFINED#
        $default = (default value) 123
    )
)'.

29) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_undefined_constructor_parameter with data set "compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy1" cannot be compiled: Parameter $bar of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy1
    lazy = false
    __construct(
        $foo = 'some value'
        $bar = #UNDEFINED#
        $default = (default value) 123
    )
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy1" cannot be compiled: Parameter $bar of __construct() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy1
    lazy = false
    __construct(
        $foo = 'some value'
        $bar = #UNDEFINED#
        $default = (default value) 123
    )
)'.

30) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_setter_injection_not_type_hinted with data set "not-compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy5" cannot be resolved: Parameter $dependency of setDependency() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy5
    lazy = false
    setDependency(
        $dependency = #UNDEFINED#
    )
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy5" cannot be resolved: Parameter $dependency of setDependency() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy5
    lazy = false
    setDependency(
        $dependency = #UNDEFINED#
    )
)'.

31) DI\Test\IntegrationTest\ErrorMessages\ErrorMessagesTest::test_setter_injection_not_type_hinted with data set "compiled" (DI\ContainerBuilder Object (...))
Failed asserting that exception message 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy5" cannot be compiled: Parameter $dependency of setDependency() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy5
    lazy = false
    setDependency(
        $dependency = #UNDEFINED#
    )
)' contains 'Entry "DI\Test\IntegrationTest\ErrorMessages\Buggy5" cannot be compiled: Parameter $dependency of setDependency() has no value defined or guessable
Full definition:
Object (
    class = DI\Test\IntegrationTest\ErrorMessages\Buggy5
    lazy = false
    setDependency(
        $dependency = #UNDEFINED#
    )
)'.

FAILURES!
Tests: 665, Assertions: 1427, Failures: 31, Skipped: 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants