Permalink
Browse files

using Nette Tester

  • Loading branch information...
dg committed Sep 12, 2012
1 parent 5d07473 commit 8d8001272a4ee9891f6877e636a9bb47eaced52e
View
@@ -0,0 +1,2 @@
+/vendor
+/composer.lock
View
@@ -15,6 +15,10 @@ before_script:
- tar xzf memcached-1.4.14.tar.gz
- sh -c "cd memcached-1.4.14 && ./configure && make && ./memcached -d" > /dev/null
+# Install Nette Tester
+ - curl -s http://getcomposer.org/installer | php
+ - php composer.phar install --dev
+
# PHP Memcache extension
- echo n | pecl install memcache > /dev/null
View
@@ -18,6 +18,9 @@
"require": {
"php": ">=5.3.0"
},
+ "require-dev": {
+ "nette/tester": "@dev"
+ },
"autoload": {
"files": ["Nette/loader.php"]
},
View
@@ -7,16 +7,12 @@
* @package Nette\Test
*/
-require __DIR__ . '/../Test/TestHelpers.php';
-require __DIR__ . '/../Test/Assert.php';
+
+require __DIR__ . '/../../vendor/nette/tester/Tester/bootstrap.php';
require __DIR__ . '/../../Nette/loader.php';
// configure environment
-error_reporting(E_ALL | E_STRICT);
-ini_set('display_errors', TRUE);
-ini_set('html_errors', FALSE);
-ini_set('log_errors', FALSE);
date_default_timezone_set('Europe/Prague');
@@ -35,17 +31,6 @@
TestHelpers::purge(TEMP_DIR);
-// catch unexpected errors/warnings/notices
-set_error_handler(function($severity, $message, $file, $line) {
- if (($severity & error_reporting()) === $severity) {
- $e = new ErrorException($message, 0, $severity, $file, $line);
- echo "Error: $message in $file:$line\nStack trace:\n" . $e->getTraceAsString();
- exit(TestCase::CODE_ERROR);
- }
- return FALSE;
-});
-
-
$_SERVER = array_intersect_key($_SERVER, array_flip(array('PHP_SELF', 'SCRIPT_NAME', 'SERVER_ADDR', 'SERVER_SOFTWARE', 'HTTP_HOST', 'DOCUMENT_ROOT', 'OS', 'argc', 'argv')));
$_SERVER['REQUEST_TIME'] = 1234567890;
$_ENV = $_GET = $_POST = array();
View
@@ -1 +1 @@
-@php.exe "%~dp0Test\RunTests.php" -p php-cgi.exe -c "%~dp0php.ini-win" -j 20 -log "%~dp0test.log" %*
+@php.exe "%~dp0..\vendor\nette\tester\Tester\RunTests.phpc" -p php-cgi.exe -c "%~dp0php.ini-win" -j 20 -log "%~dp0test.log" %*
Oops, something went wrong.

0 comments on commit 8d80012

Please sign in to comment.