sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
226 stars 58 forks source link

Fixed displaying output of text report #48

Closed michaldudek closed 8 years ago

michaldudek commented 8 years ago

Fixed an issue that Text report was not displaying - as the writer just returns a string to be output, doesn't write to stdout itself.

As previously submitted in https://github.com/sebastianbergmann/phpcov/pull/46

sebastianbergmann commented 8 years ago

This was intentional. phpcov --text <file> writes to the specified file.

michaldudek commented 8 years ago

Does it?

The only place where --text option is used I see in BaseCommand:

        if ($input->getOption('text')) {
            $writer = new PHP_CodeCoverage_Report_Text;
            $writer->process($coverage, $input->getOption('text'));
        }

The signature of ::process() is:

/**
     * @param PHP_CodeCoverage $coverage
     * @param bool             $showColors
     *
     * @return string
     */
    public function process(PHP_CodeCoverage $coverage, $showColors = false)

So --text is just used as a boolean $showColors. Nowhere in PHP_CodeCoverage_Report_Text I see something being written to a file.

$ php phpcov merge --text dump.txt cov && cat dump.txt
phpcov 3.0.0 by Sebastian Bergmann.

cat: dump.txt: No such file or directory
sebastianbergmann commented 8 years ago

You're correct. Hopefully fixed via d1cac8424ac0483fdc80cf339d6cc4c30e73bb21.

webysther commented 8 years ago

@sebastianbergmann not work afterall:

captura de tela de 2016-06-03 18-51-27

brianium/habitat                       v1.0.0
brianium/paratest                      dev-fix-tests
classpreloader/classpreloader          3.0.0
composer/semver                        1.4.1
dnoegel/php-xdg-base-dir               0.1
doctrine/inflector                     v1.1.0
doctrine/instantiator                  1.0.5
folha/illuminate                       1.0.0-rc4
folha/validation                       1.0.0-rc6
hamcrest/hamcrest-php                  v1.2.2
jakub-onderka/php-console-color        0.1
jakub-onderka/php-console-highlighter  v0.3.2
jeremeamia/SuperClosure                2.2.0
laravel/framework                      v5.2.35
laravelcollective/html                 v5.2.4
league/flysystem                       1.0.24
mockery/mockery                        0.9.5
monolog/monolog                        1.19.0
mtdowling/cron-expression              v1.1.0
myclabs/deep-copy                      1.5.1
nesbot/carbon                          1.21.0
nikic/php-parser                       v2.1.0
paragonie/random_compat                v1.4.1
pdepend/pdepend                        2.2.4
phpdocumentor/reflection-docblock      2.0.4
phploc/phploc                          3.0.1
phpmd/phpmd                            2.4.3
phpspec/php-diff                       v1.0.2
phpspec/phpspec                        2.5.0
phpspec/prophecy                       v1.6.0
phpunit/php-code-coverage              4.0.0
phpunit/php-file-iterator              1.4.1
phpunit/php-text-template              1.2.1
phpunit/php-timer                      1.0.8
phpunit/php-token-stream               1.4.8
phpunit/phpcov                         3.1.0
phpunit/phpunit                        5.4.2
phpunit/phpunit-mock-objects           3.2.0
psr/log                                1.0.0
psy/psysh                              v0.7.2
respect/validation                     1.1.2
sebastian/code-unit-reverse-lookup     1.0.0
sebastian/comparator                   1.2.0
sebastian/diff                         1.4.1
sebastian/environment                  1.3.7
sebastian/exporter                     1.2.1
sebastian/finder-facade                1.2.1
sebastian/git                          2.1.2
sebastian/global-state                 1.1.1
sebastian/object-enumerator            1.0.0
sebastian/phpcpd                       2.0.4
sebastian/recursion-context            1.0.2
sebastian/resource-operations          1.0.0
sebastian/version                      2.0.0
squizlabs/php_codesniffer              2.6.1
swiftmailer/swiftmailer                v5.4.2
symfony/config                         v3.1.0
symfony/console                        v3.0.6
symfony/debug                          v3.0.6
symfony/dependency-injection           v3.1.0
symfony/event-dispatcher               v3.1.0
symfony/filesystem                     v3.1.0
symfony/finder                         v3.0.6
symfony/http-foundation                v3.0.6
symfony/http-kernel                    v3.0.6
symfony/polyfill-mbstring              v1.2.0
symfony/polyfill-php56                 v1.2.0
symfony/polyfill-util                  v1.2.0
symfony/process                        v3.0.6
symfony/routing                        v3.0.6
symfony/translation                    v3.0.6
symfony/var-dumper                     v3.0.6
symfony/yaml                           v3.1.0
theseer/fdomdocument                   1.6.1
vlucas/phpdotenv                       v2.2.1