Comments (10)
It's a PHP bug on Windows which depend of PHP version and Windows version.
PHP hang when it's trying to read the error stream.
Currently, i have no solution :/.
from atoum.
So right now Atoum can't be used on windows ?
Could you give me the piece of code for reading the error stream.
I can try to help you.
from atoum.
You can use it, not test itself because some unit tests are UNIX dependant.
You can read classes/test.php and search stream_get_contents() function to find the "problem".
from atoum.
In classes/test.php, there is a piece of code which use stream_get_contents to read stdout and stderr.
You only need to read the one which is in second place first.
from atoum.
I'm not sure that this solution works for all Windows version.
from atoum.
You're right. I had trouble with that solution but it allows me to find why the test did not run at that time.
For now, i did not find any solution too.
from atoum.
Can you try the "engine" branch (https://github.com/mageekguy/atoum/tree/engine), please ?
from atoum.
First thing, don't forget to said in documentation to set PHPBIN to php executable on Windows.
Second thing : everything is ok with the "engine" branch, except some failure :
=> mageekguy\atoum\tests\units\autoloader::testGetDirectories():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/autoloader.php on line 19, mageekguy\atoum\test\asserter\generator() failed: array(1) is not equal to array(1)
-Reference
+Data
@@ -1 +1 @@
-array(1) {
[0]=>
string(99) "phar://c:/secret/vendor/mageekguy.atoum.phar/1\classes"
}
+array(1) {
[0]=>
string(99) "phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes"
}
=> mageekguy\atoum\tests\units\report\fields\runner\coverage\html::testCleanDestinationDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/report/fields/runner/coverage/html.php on line 233, mageekguy\atoum\test\asserter\generator() failed: function unlink(string(49) "atoum://destinationDirectory/aDirectory/firstFile") is called 0 time instead of 1
=> mageekguy\atoum\tests\units\report\fields\runner\tests\uncompleted\cli::test__toString():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/report/fields/runner/tests/uncompleted/cli.php on line 245, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -5 +5 @@
-output(27) "4f969e0f684b1
+output(28) "4f969e0f684b1
=> mageekguy\atoum\tests\units\scripts\phar\generator::testSetOriginDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/phar/generator.php on line 92, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -1 +1 @@
-string(13) "4f969e3cecf47"
+string(14) "4f969e3cecf47/"
=> mageekguy\atoum\tests\units\scripts\phar\generator::testSetDestinationDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/phar/generator.php on line 141, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -1 +1 @@
-string(13) "4f969e3d2e2a1"
+string(14) "4f969e3d2e2a1/"
There are 3 exceptions:
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testCurrent():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php on line 59:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/iterators/recursives/atoum/source.php(22): RecursiveIteratorIterator->rewind()
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php(59): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testCurrent()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCurrent')
#8 {main}
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testKey():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php on line 87:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/iterators/recursives/atoum/source.php(22): RecursiveIteratorIterator->rewind()
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php(87): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testKey()
#7 -(1): mageekguy\atoum\test->runTestMethod('testKey')
#8 {main}
=> mageekguy\atoum\tests\units\scripts\builder\vcs\svn::testCleanWorkingDirectory():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/builder/vcs/svn.php on line 383:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://workingDirectory\aDirectory' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://working...', 3)
#2 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/scripts/builder/vcs.php(112): RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: mageekguy\atoum\scripts\builder\vcs->cleanWorkingDirectory()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/generator.php(161) : eval()'d code(257): call_user_func_array('parent::cleanWo...', Array)
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/builder/vcs/svn.php(383): mock\mageekguy\atoum\scripts\builder\vcs\svn->cleanWorkingDirectory()
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\scripts\builder\vcs\svn->testCleanWorkingDirectory()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCleanWorkin...')
#8 {main}
from atoum.
And if you don't use the PHAR ?
from atoum.
Other fail :
There are 3 exceptions:
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testCurrent():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php on line 59:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 c:\secret\vendor\atoum\classes\iterators\recursives\atoum\source.php(22): RecursiveIteratorIterator->rewind()
#5 c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php(59): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testCurrent()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCurrent')
#8 {main}
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testKey():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php on line 87:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 c:\secret\vendor\atoum\classes\iterators\recursives\atoum\source.php(22): RecursiveIteratorIterator->rewind()
#5 c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php(87): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testKey()
#7 -(1): mageekguy\atoum\test->runTestMethod('testKey')
#8 {main}
=> mageekguy\atoum\tests\units\scripts\builder\vcs\svn::testCleanWorkingDirectory():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\scripts\builder\vcs\svn.php on line 383:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://workingDirectory\aDirectory' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://working...', 3)
#2 c:\secret\vendor\atoum\classes\scripts\builder\vcs.php(112): RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: mageekguy\atoum\scripts\builder\vcs->cleanWorkingDirectory()
#4 c:\secret\vendor\atoum\classes\mock\generator.php(161) : eval()'d code(257): call_user_func_array('parent::cleanWo...', Array)
#5 c:\secret\vendor\atoum\tests\units\classes\scripts\builder\vcs\svn.php(383): mock\mageekguy\atoum\scripts\builder\vcs\svn->cleanWorkingDirectory()
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\scripts\builder\vcs\svn->testCleanWorkingDirectory()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCleanWorkin...')
#8 {main}
from atoum.
Related Issues (20)
- Mocking an Throwable interface produces an error HOT 1
- php 8 support ... HOT 1
- Package not up to date on packagist HOT 1
- php 7.4 : includer fail HOT 1
- php 7.4 failed test because of error HOT 1
- strign contains in array has a strange behavior
- [bug] Error executing tests
- rename namespace to atoum without alias
- How to access private and protected properties HOT 2
- HTML coverage not produced using --use-dot-report HOT 2
- php8 test-it failing (8.0.1 -> ... incompatibility on two tests) HOT 4
- [mock] reset calls count HOT 2
- Question about execution order HOT 4
- How to use atoum on a project with no classes? HOT 3
- Silent failures (when ini_set('display_errors', 0)) HOT 2
- Where can I get the phar file for version 4.0.3? HOT 1
- Atoum 4.1 to publish HOT 3
- Question about calling($mock)->MyMethod[…]
- Atoum 4.1 error extends class HOT 1
- Fatal error with Php 8.1.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atoum.