Skip to content

Instantly share code, notes, and snippets.

@jubianchi
Created January 27, 2014 16:17
Show Gist options
  • Save jubianchi/da7ba5b4d81a489b793f to your computer and use it in GitHub Desktop.
Save jubianchi/da7ba5b4d81a489b793f to your computer and use it in GitHub Desktop.
<?php
use mageekguy\atoum;
$runner
->enableInstrumentation()
//->disableMoleInstrumentation()
//->disableCoverageInstrumentation()
;
//$coverageHtmlField = new atoum\report\fields\runner\coverage\html('atoum', __DIR__ . DIRECTORY_SEPARATOR . 'coverage');
//$coverageHtmlField->setRootUrl('http://jubianchi.fr/');
$script
->addDefaultReport()
//->addField($coverageHtmlField)
;
$ bin/atoum -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose
$ php /Users/jubianchi/repositories/hoaproject/atoum/tests/units/classes/instrumentation/stream/controller.php
@marmotz
Copy link

marmotz commented Jan 27, 2014

$ bin/atoum -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose
Using -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose arguments…
Using '/home/rlittolff/dev/atoumInstrumentation/.atoum.php' configuration file…
Using '/tmp/adddef625cfcde9306c2b97db41ad799.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…
Using --disable-loop-mode --force-terminal -d tests/units/classes/instrumentation -ncc -mcn 3 ++verbose --score-file /tmp/atoum.score arguments…
Using '/home/rlittolff/dev/atoumInstrumentation/.atoum.php' configuration file…
Using '/tmp/adddef625cfcde9306c2b97db41ad799.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…

PHP path: /usr/bin/php
PHP version:
=> PHP 5.5.8 (cli) (built: Jan 10 2014 15:34:09)
=> Copyright (c) 1997-2013 The PHP Group
=> Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
=> with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
mageekguy\atoum\tests\units\instrumentation\autoloader\decorator...
[SSSSSSS_____________________________________________________][7/7]
=> Test duration: 1.42 seconds.
=> Memory usage: 5.25 Mb.
mageekguy\atoum\tests\units\instrumentation\score\coverage...
[SSSSSSSSSSSSSSSSSSSSSSS_____________________________________][23/23]
=> Test duration: 1.69 seconds.
=> Memory usage: 28.25 Mb.
mageekguy\atoum\tests\units\instrumentation\stream...
[SSSS________________________________________________________][4/4]
=> Test duration: 0.16 second.
=> Memory usage: 4.00 Mb.
mageekguy\atoum\tests\units\instrumentation\stream\controller...
[SSSSEESEES__________________________________________________][10/10]
=> Test duration: 2.06 seconds.
=> Memory usage: 20.25 Mb.
Total tests duration: 5.32 seconds.
Total tests memory usage: 57.75 Mb.
Code coverage value: 88.90%
=> Class mageekguy\atoum\score\coverage: 88.90%
==> mageekguy\atoum\score\coverage::serialize(): 0.00%
==> mageekguy\atoum\score\coverage::unserialize(): 0.00%
==> mageekguy\atoum\score\coverage::isExcluded(): 75.00%
==> mageekguy\atoum\score\coverage::getDeclaringClass(): 14.29%
Running duration: 21.84 seconds.
Failure (4 tests, 44/44 methods, 0 void method, 0 skipped method, 0 uncompleted method, 0 failure, 4 errors, 0 exception)!
There is 1 output:
=> In mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
class ReflectionProperty#810 (2) {
public $name =>
string(7) "_scores"
public $class =>
string(40) "mageekguy\atoum\instrumentation\coverage"
}
bool(true)
There are 4 errors:
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_tell():
==> Error PHP FATAL ERROR in /home/rlittolff/dev/atoumInstrumentation/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /home/rlittolff/dev/atoumInstrumentation/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_stat():
==> Error PHP FATAL ERROR in /home/rlittolff/dev/atoumInstrumentation/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /home/rlittolff/dev/atoumInstrumentation/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_seek():
==> Error PHP FATAL ERROR in /home/rlittolff/dev/atoumInstrumentation/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /home/rlittolff/dev/atoumInstrumentation/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
==> Error PHP FATAL ERROR in /home/rlittolff/dev/atoumInstrumentation/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /home/rlittolff/dev/atoumInstrumentation/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
Press to reexecute, press any other key and to stop...

@vonglasow
Copy link

avg@debian:/tmp/atoum-586$ bin/atoum -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose
Using -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…
Using --disable-loop-mode --force-terminal -d tests/units/classes/instrumentation -ncc -mcn 3 ++verbose --score-file /tmp/atoum.score arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…

PHP path: /usr/bin/php
PHP version:
=> PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25)
=> Copyright (c) 1997-2012 The PHP Group
=> Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
=> with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
mageekguy\atoum\tests\units\instrumentation\autoloader\decorator...
[SSSSSSS_____________________________________________________][7/7]
=> Test duration: 0.90 second.
=> Memory usage: 7.25 Mb.
mageekguy\atoum\tests\units\instrumentation\score\coverage...
[SSSSSSSSSSSSSSSSSSSSSSS_____________________________________][23/23]
=> Test duration: 1.07 seconds.
=> Memory usage: 44.50 Mb.
mageekguy\atoum\tests\units\instrumentation\stream...
[SSSS________________________________________________________][4/4]
=> Test duration: 0.10 second.
=> Memory usage: 6.25 Mb.
mageekguy\atoum\tests\units\instrumentation\stream\controller...
[SSSSSEESEE__________________________________________________][10/10]
=> Test duration: 1.27 seconds.
=> Memory usage: 30.50 Mb.
Total tests duration: 3.34 seconds.
Total tests memory usage: 88.50 Mb.
Code coverage value: 88.90%
=> Class mageekguy\atoum\score\coverage: 88.90%
==> mageekguy\atoum\score\coverage::serialize(): 0.00%
==> mageekguy\atoum\score\coverage::unserialize(): 0.00%
==> mageekguy\atoum\score\coverage::isExcluded(): 75.00%
==> mageekguy\atoum\score\coverage::getDeclaringClass(): 14.29%
Running duration: 20.61 seconds.
Failure (4 tests, 44/44 methods, 0 void method, 0 skipped method, 0 uncompleted method, 0 failure, 4 errors, 0 exception)!
There is 1 output:
=> In mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
class ReflectionProperty#209 (2) {
public $name =>
string(7) "scores"
public $class =>
string(40) "mageekguy\atoum\instrumentation\coverage"
}
bool(true)
There are 4 errors:
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_tell():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_stat():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_seek():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
Press to reexecute, press any other key and to stop...^C
avg@debian:/tmp/atoum-587$ bin/atoum -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose
Using -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…
Using --disable-loop-mode --force-terminal -d tests/units/classes/instrumentation -ncc -mcn 3 ++verbose --score-file /tmp/atoum.score arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…
PHP path: /usr/bin/php
PHP version:
=> PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25)
=> Copyright (c) 1997-2012 The PHP Group
=> Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
=> with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
mageekguy\atoum\tests\units\instrumentation\autoloader\decorator...
[SSSSSSS
____________________________________________________][7/7]
=> Test duration: 0.04 second.
=> Memory usage: 5.25 Mb.
mageekguy\atoum\tests\units\instrumentation\score\coverage...
[SSSSSSSSSSSSSSSSSSSSSSS_____________________________________][23/23]
=> Test duration: 0.57 second.
=> Memory usage: 37.75 Mb.
mageekguy\atoum\tests\units\instrumentation\stream...
[SSSS________________________________________________________][4/4]
=> Test duration: 0.02 second.
=> Memory usage: 4.00 Mb.
mageekguy\atoum\tests\units\instrumentation\stream\controller...
[SSSSSEEESE__________________________________________________][10/10]
=> Test duration: 0.23 second.
=> Memory usage: 21.00 Mb.
Total tests duration: 0.86 second.
Total tests memory usage: 68.00 Mb.
Code coverage value: 88.90%
=> Class mageekguy\atoum\score\coverage: 88.90%
==> mageekguy\atoum\score\coverage::serialize(): 0.00%
==> mageekguy\atoum\score\coverage::unserialize(): 0.00%
==> mageekguy\atoum\score\coverage::isExcluded(): 75.00%
==> mageekguy\atoum\score\coverage::getDeclaringClass(): 14.29%
Running duration: 1.54 seconds.
Failure (4 tests, 44/44 methods, 0 void method, 0 skipped method, 0 uncompleted method, 0 failure, 4 errors, 0 exception)!
There is 1 output:
=> In mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
class ReflectionProperty#209 (2) {
public $name =>
string(7) "_scores"
public $class =>
string(40) "mageekguy\atoum\instrumentation\coverage"
}
bool(true)
There are 4 errors:
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_tell():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_stat():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_seek():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
==> Error UNKNOWN in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by unknown file:
Segmentation fault (core dumped)
Press to reexecute, press any other key and to stop...q
avg@debian:/tmp/atoum-588$ ^C
avg@debian:/tmp/atoum-588$ php -v
PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
avg@debian:/tmp/atoum-589$ php switch php-5.5.3
PHP Fatal error: Call to undefined function Symfony\Component\Yaml\ctype_digit() in /var/www/phpswitch/phpswitch/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php on line 408

Fatal error: Call to undefined function Symfony\Component\Yaml\ctype_digit() in /var/www/phpswitch/phpswitch/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php on line 408
avg@debian:/tmp/atoum-590$ phpswitch php:switch php-5.5.3
PHP switched to php-5.5.3
avg@debian:/tmp/atoum-591$ bin/atoum -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose
Using -d tests/units/classes/instrumentation -ncc -mcn 3 --loop ++verbose arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…
Using --disable-loop-mode --force-terminal -d tests/units/classes/instrumentation -ncc -mcn 3 ++verbose --score-file /tmp/atoum.score arguments…
Using '/tmp/atoum/.atoum.php' configuration file…
Using '/tmp/9cec545c300801d4c4861f9311c93a09.atoum.cache' autoloader cache file…
Using 'tests/units/classes/instrumentation/autoloader/decorator.php' test file…
Using 'tests/units/classes/instrumentation/score/coverage.php' test file…
Using 'tests/units/classes/instrumentation/stream.php' test file…
Using 'tests/units/classes/instrumentation/stream/controller.php' test file…

PHP path: /var/www/phpswitch/config/installed/php-5.5.3/bin/php
PHP version:
=> PHP 5.5.3 (cli) (built: Jan 27 2014 17:40:55)
=> Copyright (c) 1997-2013 The PHP Group
=> Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
mageekguy\atoum\tests\units\instrumentation\autoloader\decorator...
[SSSSSSS_____________________________________________________][7/7]
=> Test duration: 0.02 second.
=> Memory usage: 3.00 Mb.
mageekguy\atoum\tests\units\instrumentation\score\coverage...
[SSSSSSSSSSSSSSSSSSSSSSS_____________________________________][23/23]
=> Test duration: 0.23 second.
=> Memory usage: 22.00 Mb.
mageekguy\atoum\tests\units\instrumentation\stream...
[SSSS________________________________________________________][4/4]
=> Test duration: 0.01 second.
=> Memory usage: 2.25 Mb.
mageekguy\atoum\tests\units\instrumentation\stream\controller...
[SSSSSEESEE__________________________________________________][10/10]
=> Test duration: 0.10 second.
=> Memory usage: 7.75 Mb.
Total tests duration: 0.37 second.
Total tests memory usage: 35.00 Mb.
Code coverage value: 88.90%
=> Class mageekguy\atoum\score\coverage: 88.90%
==> mageekguy\atoum\score\coverage::serialize(): 0.00%
==> mageekguy\atoum\score\coverage::unserialize(): 0.00%
==> mageekguy\atoum\score\coverage::isExcluded(): 75.00%
==> mageekguy\atoum\score\coverage::getDeclaringClass(): 14.29%
Running duration: 2.23 seconds.
Failure (4 tests, 44/44 methods, 0 void method, 0 skipped method, 0 uncompleted method, 0 failure, 4 errors, 0 exception)!
There is 1 output:
=> In mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
object(ReflectionProperty)#810 (2) {
["name"]=>
string(7) "_scores"
["class"]=>
string(40) "mageekguy\atoum\instrumentation\coverage"
}
bool(true)
There are 4 errors:
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_stat():
==> Error PHP FATAL ERROR in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /tmp/atoum/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_tell():
==> Error PHP FATAL ERROR in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /tmp/atoum/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_read():
==> Error PHP FATAL ERROR in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /tmp/atoum/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
=> mageekguy\atoum\tests\units\instrumentation\stream\controller::testStream_seek():
==> Error PHP FATAL ERROR in /tmp/atoum/tests/units/classes/instrumentation/stream/controller.php on unknown line, generated by file /tmp/atoum/classes/instrumentation/coverage.php on line 26:
Access to undeclared static property: mageekguy\atoum\instrumentation\coverage::$_scores
Press to reexecute, press any other key and to stop...

@vonglasow
Copy link

==> string(47) "mageekguy\atoum\mock\controller\linker::getMock"
==> string(41) "mageekguy\atoum\test\adapter\calls::reset"
==> string(41) "mageekguy\atoum\test\adapter\calls::reset"
==> string(44) "mageekguy\atoum\mock\controller\linker::init"
==> string(43) "mageekguy\atoum\test\adapter\storage::reset"
==> string(37) "mageekguy\atoum\score::addMemoryUsage"
==> string(34) "mageekguy\atoum\score::addDuration"
==> ";}}s:12:"_durations";a:1:{i:0;a:4:{s:5:"class";s:61:"mageekguy\atoum\tests\units\instrumentation\stream\controller";s:6:"method";s:15:"testStream_read";s:5:"value";d:0.011538982391357422;s:4:"path";s:68:"/tmp/atoum/tests/units/classes/instrumentation/stream/controller.php";}}s:15:"_memoryUsages";a:1:{i:0;a:3:{s:5:"class";s:61:"mageekguy\atoum\tests\units\instrumentation\stream\controller";s:6:"method";s:15:"testStream_read";s:5:"value";i:1572864;}}s:14:"_voidMethods";a:0:{}s:21:"_uncompletedMethods";a:0:{}s:17:"_skippedMethods";a:0:{}s:11:"_coverage";C:46:"mageekguy\atoum\instrumentation\score\coverage":240:{a:5:{i:0;a:1:{s:49:"mageekguy\atoum\instrumentation\stream\controller";s:56:"/tmp/atoum/classes/instrumentation/stream/controller.php";}i:1;a:1:{s:49:"mageekguy\atoum\instrumentation\stream\controller";a:0:{}}i:2;a:0:{}i:3;a:0:{}i:4;a:0:{}}}}string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(39) "mageekguy\atoum\writers\std::__destruct"
==> string(35) "mageekguy\atoum\mock\stream::__call"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment