Permalink
Browse files

Case change; tests dir

  • Loading branch information...
1 parent 64b39cf commit ad5a53fa7ccee18d96db1bb1a5dd536affd4ce0b @tomnomnom committed Feb 20, 2012
@@ -12,16 +12,14 @@ function stderr($data){
}
spl_autoload_register(function($class){
- $class = strToLower(str_replace('\\', '/', $class));
- require __DIR__."/../library/{$class}.php";
+ $class = str_replace('\\', '/', $class);
+ require __DIR__."/../Library/{$class}.php";
});
set_exception_handler(function($e){
- stderr("Uncaught exception in [{$e->getFile()}] ");
- stderr("on line [{$e->getLine()}]\n");
- stderr($e->getMessage()."\n");
- stderr($e->getTraceAsString()."\n");
-
+ $type = get_class($e);
+ stderr("Uncaught {$type} [{$e->getCode()}]: {$e->getMessage()}\n");
+ stderr($e->getTraceAsString().PHP_EOL);
exit(1);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,12 @@
+<?php
+namespace Test;
+
+class CompatibilityTest extends \PHPUnit_Framework_TestCase {
+ public function testCurl(){
+ $this->assertTrue(
+ is_callable('curl_init'),
+ "curl_init is not callable. PHP must be configured with --with-curl"
+ );
+ }
+}
+
View
@@ -0,0 +1,7 @@
+<phpunit bootstrap="Include/Init.php">
+ <testsuites>
+ <testsuite name="tvyv">
+ <directory>Test</directory>
+ </testsuite>
+ </testsuites>
+</phpunit>
View
@@ -5,8 +5,8 @@
* Original author: John McLear <john@mclear.co.uk>
* Modified by: Tom Hudson <mail@tomnomnom.com>
*/
-$settings = require __DIR__.'/include/init.php';
-$messages = require __DIR__.'/include/messages.php';
+$settings = require __DIR__.'/Include/Init.php';
+$messages = require __DIR__.'/Include/Messages.php';
$logFactory = new \Factory\Logger($settings->log);
$log = $logFactory->make();

0 comments on commit ad5a53f

Please sign in to comment.