Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding phpunit configuration and bootstrap files

  • Loading branch information...
commit 6bf0dbad402378bf633c33fe11a6d6235e9ee708 1 parent 57c5de3
@mgburns mgburns authored
Showing with 32 additions and 0 deletions.
  1. +12 −0 phpunit.xml
  2. +20 −0 tests/bootstrap.php
View
12 phpunit.xml
@@ -0,0 +1,12 @@
+<phpunit
+ bootstrap="./tests/bootstrap.php"
+ backupGlobals="false"
+ colors="true"
+>
+ <testsuites>
+ <testsuite name="UnitTests">
+ <directory prefix="test_" suffix=".php">./tests</directory>
+ <exclude>./tests/selenium</exclude>
+ </testsuite>
+ </testsuites>
+</phpunit>
View
20 tests/bootstrap.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * PHPUnit Bootstrap
+ *
+ * To run these tests:
+ * 1. Install PHPUnit (http://www.phpunit.de)
+ * 2. Install the WordPress Unit Testing Framework (http://unit-test.svn.wordpress.org/trunk)
+ * 3. Configure wp-tests-config.php, install WordPress and create a clean DB
+ * 4. Set the WP_TESTS_DIR environment variable to point at the WP Unit Testing Framework
+ *
+ * $ cd wp-content/plugins/bu-versions
+ * $ phpunit
+ */
+
+$GLOBALS['wp_tests_options'] = array(
+ 'active_plugins' => array( 'bu-versions/bu-versions.php' ),
+);
+
+require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
+
Please sign in to comment.
Something went wrong with that request. Please try again.