Skip to content

Commit

Permalink
Merge pull request #99 from atoum/telemetry
Browse files Browse the repository at this point in the history
Enable the telemetry report
  • Loading branch information
jubianchi committed May 16, 2016
2 parents 47b5a60 + e6d6cfd commit 307c2f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .atoum.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
use \mageekguy\atoum;

use mageekguy\atoum;
use mageekguy\atoum\reports;
use mageekguy\atoum\writers\std;

define('TEST_ROOT', __DIR__ . DIRECTORY_SEPARATOR . 'tests');

Expand All @@ -18,8 +21,7 @@ function colorized() {
return ($color >= 256);
}

if(colorized())
{
if(colorized()) {
$script
->addDefaultReport()
->addField(new atoum\report\fields\runner\atoum\logo())
Expand All @@ -30,3 +32,14 @@ function colorized() {
$script->noCodeCoverageForNamespaces('mageekguy');
$script->bootstrapFile(TEST_ROOT . DIRECTORY_SEPARATOR . 'bootstrap.php');
$runner->addTestsFromDirectory(TEST_ROOT . DIRECTORY_SEPARATOR . 'units');

if (file_exists(__DIR__ . '/vendor/autoload.php') === true) {
require_once __DIR__ . '/vendor/autoload.php';
}

if (class_exists('mageekguy\atoum\reports\telemetry') === true && version_compare(phpversion(), '5.5.0', '>=')) {
$telemetry = new reports\telemetry();
$telemetry->readProjectNameFromComposerJson(__DIR__ . '/composer.json');
$telemetry->addWriter(new std\out());
$runner->addReport($telemetry);
}
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: php

sudo: false

php:
Expand All @@ -15,6 +16,7 @@ env:

script:
- composer update $COMPOSER_PREFER
- "[[ \"$TRAVIS_PHP_VERSION\" != '5.3' && \"$TRAVIS_PHP_VERSION\" != '5.4' ]] && composer require --dev 'atoum/reports-extension:^2.0.1' || true"
- bin/atoum -ncc

notifications:
Expand Down

0 comments on commit 307c2f9

Please sign in to comment.