<?php

use mageekguy\atoum\reports;

$runner
	->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
	->disallowUndefinedMethodInInterface()
;

$travis = getenv('TRAVIS');

if ($travis)
{
	$script->addDefaultReport();

	$coverallsToken = getenv('COVERALLS_REPO_TOKEN');

	if ($coverallsToken)
	{
		$coverallsReport = new reports\asynchronous\coveralls(__DIR__ . '/classes', $coverallsToken);

		$defaultFinder = $coverallsReport->getBranchFinder();

		$coverallsReport
			->setBranchFinder(function() use ($defaultFinder) {
					if (($branch = getenv('TRAVIS_BRANCH')) === false)
					{
						$branch = $defaultFinder();
					}

					return $branch;
				}
			)
			->setServiceName('travis-ci')
			->setServiceJobId(getenv('TRAVIS_JOB_ID'))
			->addDefaultWriter()
		;

		$runner->addReport($coverallsReport);
	}
}

<?php

use mageekguy\atoum\reports;

$runner
	->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
	->disallowUndefinedMethodInInterface()
;

$travis = getenv('TRAVIS');

if ($travis)
{
	$script->addDefaultReport();

	$coverallsToken = getenv('COVERALLS_REPO_TOKEN');

	if ($coverallsToken)
	{
		$coverallsReport = new reports\asynchronous\coveralls('classes', $coverallsToken);

		$defaultFinder = $coverallsReport->getBranchFinder();

		$coverallsReport
			->setBranchFinder(function() use ($defaultFinder) {
					if (($branch = getenv('TRAVIS_BRANCH')) === false)
					{
						$branch = $defaultFinder();
					}

					return $branch;
				}
			)
			->setServiceName('travis-ci')
			->setServiceJobId(getenv('TRAVIS_JOB_ID'))
			->addDefaultWriter()
		;

		$runner->addReport($coverallsReport);
	}
}

Update source directory in coveralls configuration.
Update source directory in coveralls configuration.
