Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: xi-project/xi-collections
base: 343b838174
...
head fork: xi-project/xi-collections
compare: 569e8cd968
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
View
3  .gitignore
@@ -2,3 +2,6 @@
/.idea
/tests/phpunit.xml
/tests/coverage
+/vendor/
+composer.phar
+composer.lock
View
14 .travis.yml
@@ -0,0 +1,14 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+
+before_script:
+ - wget http://getcomposer.org/composer.phar
+ - php composer.phar install
+
+script: phpunit -c tests
+
+notifications:
+ irc: "irc.freenode.net#xi-project"
View
23 composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "xi/collections",
+ "type": "library",
+ "description": "Functional, immutable and extensible enumerations and collections for PHP 5.3.",
+ "keywords": ["collections"],
+ "homepage": "http://github.com/xi-project/xi-collections",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Eevert Saukkokoski",
+ "email": "eevert.saukkokoski@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "autoload": {
+ "psr-0": {
+ "Xi\\Collections": ["library/", "tests/"]
+ }
+ }
+}
View
33 tests/bootstrap.php
@@ -1,29 +1,8 @@
<?php
-/**
- * Maximum level error reporting
- */
-error_reporting(E_ALL | E_STRICT);
-/**
- * Get both the test and library directories in the include path
- */
-set_include_path(dirname(__DIR__) . '/library' . PATH_SEPARATOR . __DIR__ . PATH_SEPARATOR . get_include_path());
-
-/**
- * Register a trivial autoloader
- */
-spl_autoload_register(function($class) {
- $filename = str_replace(array("\\", "_"), DIRECTORY_SEPARATOR, $class) . '.php';
- foreach (explode(PATH_SEPARATOR, get_include_path()) as $includePath) {
- if (file_exists($includePath . DIRECTORY_SEPARATOR . $filename)) {
- include_once $filename;
- break;
- }
- }
- return class_exists($class, false);
-});
-
-/**
- * Set default time zone
- */
-date_default_timezone_set('Europe/Helsinki');
+if (!@include __DIR__ . '/../vendor/autoload.php') {
+ die("You must set up the project dependencies, run the following commands:
+wget http://getcomposer.org/composer.phar
+php composer.phar install
+");
+}
View
8 tests/phpunit.xml.dist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<phpunit bootstrap="bootstrap.php" colors="true">
+ <testsuites>
+ <testsuite name="xi-collections tests">
+ <directory>./Xi</directory>
+ </testsuite>
+ </testsuites>
+</phpunit>

No commit comments for this range

Something went wrong with that request. Please try again.