Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added tests configuration

  • Loading branch information...
commit c8af2f552c94ed9532693be053a712f6f5bd5cd3 1 parent 7b6e399
@everzet everzet authored
Showing with 41 additions and 0 deletions.
  1. +3 −0  .gitignore
  2. +18 −0 Tests/bootstrap.php
  3. +20 −0 phpunit.xml.dist
View
3  .gitignore
@@ -0,0 +1,3 @@
+composer.phar
+composer.lock
+vendor
View
18 Tests/bootstrap.php
@@ -0,0 +1,18 @@
+<?php
+
+if (file_exists($file = __DIR__.'/../vendor/.composer/autoload.php')) {
+ $autoload = require_once $file;
+} else {
+ throw new RuntimeException('Install dependencies to run test suite.');
+}
+
+spl_autoload_register(function($class) {
+ if (0 === strpos($class, 'Knp\\Bundle\\RadBundle\\')) {
+ $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 3)).'.php';
+ if (!stream_resolve_include_path($path)) {
+ return false;
+ }
+ require_once $path;
+ return true;
+ }
+});
View
20 phpunit.xml.dist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit colors="false" bootstrap="Tests/bootstrap.php">
+ <testsuites>
+ <testsuite name="KnpMenuBundle Test Suite">
+ <directory suffix="Test.php">./Tests/</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist>
+ <directory>./</directory>
+ <exclude>
+ <directory>./Resources</directory>
+ <directory>./Tests</directory>
+ <directory>./vendor</directory>
+ </exclude>
+ </whitelist>
+ </filter>
+</phpunit>
Please sign in to comment.
Something went wrong with that request. Please try again.