Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding base files before development starts

  • Loading branch information...
commit 82d4be6173cf723cbfc616091f435db09fea37a2 1 parent 26e664c
Padraic Brady authored
View
27 LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2010, Pádraic Brady
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * The name of Pádraic Brady may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
1  README
@@ -0,0 +1 @@
+This is the "rewrite" branch. The README will be written once a release is being prepared.
View
8 bin/mutateme
@@ -0,0 +1,8 @@
+#!/usr/bin/env php
+<?php
+if (strpos('@php_bin@', '@php_bin') === 0) {
+ set_include_path(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR . get_include_path());
+}
+
+require_once 'Mutateme/Framework.php';
+require 'Mutateme/Console/Command.php';
View
3  bin/mutateme.bat
@@ -0,0 +1,3 @@
+@echo off
+set PHPBIN="@php_bin@"
+"@php_bin@" "@bin_dir@\mutateme" %*
View
80 tests/Bootstrap.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Mutateme
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://github.com/padraic/mutateme/blob/rewrite/LICENSE
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to padraic@php.net so we can send you a copy immediately.
+ *
+ * @category Mutateme
+ * @package Mutateme
+ * @subpackage UnitTests
+ * @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
+ * @license http://github.com/padraic/mutateme/blob/rewrite/LICENSE New BSD License
+ */
+
+/*
+ * Set error reporting to the level to which Mutateme code must comply.
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/*
+ * Determine the root, library, and tests directories of the framework
+ * distribution.
+ */
+$root = realpath(dirname(dirname(__FILE__)));
+$library = "$root/library";
+$tests = "$root/tests";
+
+/*
+ * Prepend the Mutateme library/ and tests/ directories to the
+ * include_path. This allows the tests to run out of the box and helps prevent
+ * loading other copies of the code and tests that would supercede
+ * this copy.
+ */
+$path = array(
+ $library,
+ $tests,
+ get_include_path(),
+);
+set_include_path(implode(PATH_SEPARATOR, $path));
+
+/**
+ * Setup autoloading
+ */
+require_once 'Zend/Loader/Autoloader.php';
+$autoloader = Zend_Loader_Autoloader::getInstance();
+$autoloader->registerPrefix('PHPUnit_');
+
+if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true &&
+ version_compare(PHPUnit_Runner_Version::id(), '3.1.6', '>=')) {
+
+ /*
+ * Add Mutateme library/ directory to the PHPUnit code coverage
+ * whitelist. This has the effect that only production code source files
+ * appear in the code coverage report and that all production code source
+ * files, even those that are not covered by a test yet, are processed.
+ */
+ PHPUnit_Util_Filter::addDirectoryToWhitelist($library);
+
+ /*
+ * Omit from code coverage reports the contents of the tests directory
+ */
+ foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) {
+ PHPUnit_Util_Filter::addDirectoryToFilter($tests, $suffix);
+ }
+ PHPUnit_Util_Filter::addDirectoryToFilter(PEAR_INSTALL_DIR);
+ PHPUnit_Util_Filter::addDirectoryToFilter(PHP_LIBDIR);
+}
+
+/*
+ * Unset global variables that are no longer needed.
+ */
+unset($root, $library, $tests, $path);
+
View
18 tests/phpunit.xml
@@ -0,0 +1,18 @@
+<phpunit bootstrap="./Bootstrap.php">
+ <testsuite name="Mutateme Test Suite">
+ <directory>./</directory>
+ </testsuite>
+
+ <groups>
+ <exclude>
+ <group>disable</group>
+ </exclude>
+ </groups>
+
+ <filter>
+ <whitelist>
+ <directory suffix=".php">../library/</directory>
+ </whitelist>
+ </filter>
+</phpunit>
+
Please sign in to comment.
Something went wrong with that request. Please try again.