Skip to content

Commit

Permalink
added testing support files
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 30, 2014
1 parent 9448664 commit a954281
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: php
php:
- 5.3.3
- 5.4
- 5.5
- 5.6
- hhvm

matrix:
allow_failures:
- php: hhvm

script: vendor/bin/tester tests -s -c tests/php-unix.ini

after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

before_script:
# Install Nette Tester
- composer install --no-interaction --dev --prefer-source
3 changes: 3 additions & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*/output
/test.log
/tmp
32 changes: 32 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

// The Nette Tester command-line runner can be
// invoked through the command: ../vendor/bin/tester .

if (@!include __DIR__ . '/../vendor/autoload.php') {
echo 'Install Nette Tester using `composer update --dev`';
exit(1);
}


Tester\Environment::setup();
date_default_timezone_set('Europe/Prague');


class Notes
{
static public $notes = array();

public static function add($message)
{
self::$notes[] = $message;
}

public static function fetch()
{
$res = self::$notes;
self::$notes = array();
return $res;
}

}
4 changes: 4 additions & 0 deletions tests/php-unix.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[PHP]

[Zend]
;zend_extension="./ext/zend_extension"
5 changes: 5 additions & 0 deletions tests/php-win.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[PHP]
extension_dir = "./ext"

[Zend]
;zend_extension="./ext/php_xdebug-2.0.5-5.3-vc6.dll"

0 comments on commit a954281

Please sign in to comment.