Skip to content

Instantly share code, notes, and snippets.

View gustavnikolaj's full-sized avatar

Gustav Nikolaj gustavnikolaj

View GitHub Profile
@gustavnikolaj
gustavnikolaj / README.md
Created July 14, 2012 14:20
Alternative PHP Autoloader

Alternative PHP Autoloader

An alternative way of writing an autoload-function. From my personal experience it works and returns the proper boolean values.

Feedback is welcome!

var origExpect = global.expect;
global.expect = function (subject) {
if (arguments.length > 1) {
throw new Error('You passed more than one argument to jest expect.');
}
return origExpect(subject);
};