Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/PHPOffice/PHPPowerPoint
Browse files Browse the repository at this point in the history
…into develop

Conflicts:
	.gitignore
	tests/bootstrap.php
  • Loading branch information
Progi1984 committed Jun 10, 2014
2 parents c72f4c0 + 6f10b98 commit 3789c4c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Thumbs.db
Desktop.ini
.idea
_build
build/
phpunit.xml
composer.lock
composer.phar
vendor
*.settings
*.project
*.buildpath
Tests/results

/samples/results
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ before_script:

script:
## PHP_CodeSniffer
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n
## Custom xml is used until namespaces implemented. Use PSR2 after that
- ./vendor/bin/phpcs src/ tests/ --standard=phpcs.xml -n
## PHPUnit
- phpunit -c ./ --coverage-text
## PHP Copy/Paste Detector
# - php phpcpd.phar src/
## PHP Mess Detector
# - phpmd Classes/ text codesize,unusedcode,naming,design
# - phpmd src/ text codesize,unusedcode,naming,design
## PHPLOC
- php phploc.phar src/
26 changes: 12 additions & 14 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,20 @@

date_default_timezone_set('UTC');

// defining base dir for tests
if (!defined('PHPPOWERPOINT_TESTS_BASE_DIR')) {
define('PHPPOWERPOINT_TESTS_BASE_DIR', realpath(__DIR__));
}
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../src'));

$vendor = realpath(__DIR__ . '/../vendor');
// Define path to application tests directory
defined('APPLICATION_TESTS_PATH')
|| define('APPLICATION_TESTS_PATH', realpath(dirname(__FILE__)));

if (file_exists($vendor . "/autoload.php")) {
require $vendor . "/autoload.php";
} else {
$vendor = realpath(__DIR__ . '/../../../');
if (file_exists($vendor . "/autoload.php")) {
require $vendor . "/autoload.php";
} else {
throw new Exception("Unable to load dependencies");
}
// Define application environment
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'ci');

// Register autoloader
if (!defined('PHPPOWERPOINT_ROOT')) {
define('PHPPOWERPOINT_ROOT', APPLICATION_PATH . '/');
}

spl_autoload_register(function ($class) {
Expand Down

0 comments on commit 3789c4c

Please sign in to comment.