<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[25165] trunk: Move PHPUnit tests into a tests/phpunit directory.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/25165">25165</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-08-29 18:39:34 +0000 (Thu, 29 Aug 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.
see <a href="http://core.trac.wordpress.org/ticket/25088">#25088</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludesbootstrapphp">trunk/tests/phpunit/includes/bootstrap.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkphpunitxmldist">trunk/phpunit.xml.dist</a></li>
<li>trunk/tests/phpunit/</li>
<li><a href="#trunktestsphpunitREADMEtxt">trunk/tests/phpunit/README.txt</a></li>
<li><a href="#trunktestsphpunitbuildxml">trunk/tests/phpunit/build.xml</a></li>
<li>trunk/tests/phpunit/data/</li>
<li>trunk/tests/phpunit/includes/</li>
<li><a href="#trunktestsphpunitmultisitexml">trunk/tests/phpunit/multisite.xml</a></li>
<li>trunk/tests/phpunit/tests/</li>
<li><a href="#trunktestsphpunitwpmailrealtestphp">trunk/tests/phpunit/wp-mail-real-test.php</a></li>
<li><a href="#trunkwptestsconfigsamplephp">trunk/wp-tests-config-sample.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunktestsREADMEtxt">trunk/tests/README.txt</a></li>
<li><a href="#trunktestsbuildxml">trunk/tests/build.xml</a></li>
<li>trunk/tests/data/</li>
<li>trunk/tests/includes/</li>
<li><a href="#trunktestsmultisitexml">trunk/tests/multisite.xml</a></li>
<li><a href="#trunktestsphpunitxmldist">trunk/tests/phpunit.xml.dist</a></li>
<li>trunk/tests/tests/</li>
<li><a href="#trunktestswpmailrealtestphp">trunk/tests/wp-mail-real-test.php</a></li>
<li><a href="#trunktestswptestsconfigsamplephp">trunk/tests/wp-tests-config-sample.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkphpunitxmldistfromrev25158trunktestsphpunitxmldist"></a>
<div class="copfile"><h4>Copied: trunk/phpunit.xml.dist (from rev 25158, trunk/tests/phpunit.xml.dist) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/phpunit.xml.dist (rev 0)
+++ trunk/phpunit.xml.dist 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+<phpunit
+ bootstrap="tests/phpunit/includes/bootstrap.php"
+ backupGlobals="false"
+ colors="true"
+ >
+ <testsuites>
+ <!-- Default test suite to run all tests -->
+ <testsuite>
+ <directory suffix=".php">tests/phpunit/tests</directory>
+ <exclude>tests/phpunit/tests/actions/closures.php</exclude>
+ <exclude>tests/phpunit/tests/image/editor.php</exclude>
+ <exclude>tests/phpunit/tests/image/editor_gd.php</exclude>
+ <exclude>tests/phpunit/tests/image/editor_imagick.php</exclude>
+ <file phpVersion="5.3.0">tests/phpunit/tests/actions/closures.php</file>
+ <file phpVersion="5.3.0">tests/phpunit/tests/image/editor.php</file>
+ <file phpVersion="5.3.0">tests/phpunit/tests/image/editor_gd.php</file>
+ <file phpVersion="5.3.0">tests/phpunit/tests/image/editor_imagick.php</file>
+ </testsuite>
+ </testsuites>
+ <groups>
+ <exclude>
+ <group>ajax</group>
+ </exclude>
+ </groups>
+ <logging>
+ <log type="junit" target="tests/phpunit/build/logs/junit.xml" logIncompleteSkipped="false"/>
+ </logging>
+</phpunit>
</ins></span></pre></div>
<a id="trunktestsREADMEtxt"></a>
<div class="delfile"><h4>Deleted: trunk/tests/README.txt (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/README.txt 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/README.txt 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-The short version:
-
-1. Create a clean MySQL database and user. DO NOT USE AN EXISTING DATABASE or you will lose data, guaranteed.
-
-2. Copy wp-tests-config-sample.php to wp-tests-config.php, edit it and include your database name/user/password.
-
-3. $ svn up
-
-4. Run the tests from the "trunk/tests" directory:
- To execute a particular test:
- $ phpunit tests/test_case.php
- To execute all tests:
- $ phpunit
-
-Notes:
-
-Test cases live in the 'tests' subdirectory. All files in that directory will be included by default. Extend the WP_UnitTestCase class to ensure your test is run.
-
-phpunit will initialize and install a (more or less) complete running copy of WordPress each time it is run. This makes it possible to run functional interface and module tests against a fully working database and codebase, as opposed to pure unit tests with mock objects and stubs. Pure unit tests may be used also, of course.
-
-Changes to the test database will be rolled back as tests are finished, to ensure a clean start next time the tests are run.
-
-phpunit is intended to run at the command line, not via a web server.
</del></span></pre></div>
<a id="trunktestsbuildxml"></a>
<div class="delfile"><h4>Deleted: trunk/tests/build.xml (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/build.xml 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/build.xml 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-<?xml version="1.0" encoding="utf-8"?>
-<project name="WordPress Unit Tests" default="build" basedir=".">
- <target name="clean">
- <delete dir="build" />
- </target>
- <target name="prepare">
- <mkdir dir="build/logs" />
- <mkdir dir="build/phpunitreport" />
- </target>
- <target name="phpunit">
- <exec command="phpunit" passthru="true"></exec>
- <phpunitreport infile="build/logs/junit.xml" format="frames" todir="build/phpunitreport" usesorttable="true" />
- </target>
- <target name="build" depends="clean,prepare,phpunit" />
-</project>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestsmultisitexml"></a>
<div class="delfile"><h4>Deleted: trunk/tests/multisite.xml (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/multisite.xml 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/multisite.xml 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-<phpunit
- bootstrap="includes/bootstrap.php"
- backupGlobals="false"
- colors="true"
- >
- <php>
- <const name="WP_TESTS_MULTISITE" value="1" />
- </php>
- <testsuites>
- <!-- Default test suite to run all tests -->
- <testsuite>
- <directory suffix=".php">tests</directory>
- <exclude>tests/actions/closures.php</exclude>
- <exclude>tests/image/editor.php</exclude>
- <exclude>tests/image/editor_gd.php</exclude>
- <exclude>tests/image/editor_imagick.php</exclude>
- <file phpVersion="5.3.0">tests/actions/closures.php</file>
- <file phpVersion="5.3.0">tests/image/editor.php</file>
- <file phpVersion="5.3.0">tests/image/editor_gd.php</file>
- <file phpVersion="5.3.0">tests/image/editor_imagick.php</file>
- </testsuite>
- </testsuites>
- <groups>
- <exclude>
- <group>ajax</group>
- </exclude>
- </groups>
-</phpunit>
</del></span></pre></div>
<a id="trunktestsphpunitREADMEtxtfromrev25158trunktestsREADMEtxt"></a>
<div class="copfile"><h4>Copied: trunk/tests/phpunit/README.txt (from rev 25158, trunk/tests/README.txt) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/README.txt (rev 0)
+++ trunk/tests/phpunit/README.txt 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+The short version:
+
+1. Create a clean MySQL database and user. DO NOT USE AN EXISTING DATABASE or you will lose data, guaranteed.
+
+2. Copy wp-tests-config-sample.php to wp-tests-config.php, edit it and include your database name/user/password.
+
+3. $ svn up
+
+4. Run the tests from the "trunk/tests" directory:
+ To execute a particular test:
+ $ phpunit tests/test_case.php
+ To execute all tests:
+ $ phpunit
+
+Notes:
+
+Test cases live in the 'tests' subdirectory. All files in that directory will be included by default. Extend the WP_UnitTestCase class to ensure your test is run.
+
+phpunit will initialize and install a (more or less) complete running copy of WordPress each time it is run. This makes it possible to run functional interface and module tests against a fully working database and codebase, as opposed to pure unit tests with mock objects and stubs. Pure unit tests may be used also, of course.
+
+Changes to the test database will be rolled back as tests are finished, to ensure a clean start next time the tests are run.
+
+phpunit is intended to run at the command line, not via a web server.
</ins></span></pre></div>
<a id="trunktestsphpunitbuildxmlfromrev25158trunktestsbuildxml"></a>
<div class="copfile"><h4>Copied: trunk/tests/phpunit/build.xml (from rev 25158, trunk/tests/build.xml) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/build.xml (rev 0)
+++ trunk/tests/phpunit/build.xml 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+<project name="WordPress Unit Tests" default="build" basedir=".">
+ <target name="clean">
+ <delete dir="build" />
+ </target>
+ <target name="prepare">
+ <mkdir dir="build/logs" />
+ <mkdir dir="build/phpunitreport" />
+ </target>
+ <target name="phpunit">
+ <exec command="phpunit" passthru="true"></exec>
+ <phpunitreport infile="build/logs/junit.xml" format="frames" todir="build/phpunitreport" usesorttable="true" />
+ </target>
+ <target name="build" depends="clean,prepare,phpunit" />
+</project>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestsphpunitincludesbootstrapphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/includes/bootstrap.php (25158 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/includes/bootstrap.php 2013-08-28 18:58:57 UTC (rev 25158)
+++ trunk/tests/phpunit/includes/bootstrap.php 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -4,21 +4,18 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx">
</span><del>-$config_file_path = dirname( __FILE__ ) . '/../wp-tests-config.php';
-if ( ! file_exists( $config_file_path ) ) {
- // Support having the config file one level up.
- $config_file_path = dirname( __FILE__ ) . '/../../wp-tests-config.php';
</del><ins>+$config_file_path = dirname( dirname( __FILE__ ) );
+if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) {
+ // Support the config file from the root of the develop repository.
+ if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' )
+ $config_file_path = dirname( dirname( $config_file_path ) );
</ins><span class="cx"> }
</span><ins>+$config_file_path .= '/wp-tests-config.php';
</ins><span class="cx">
</span><span class="cx"> /*
</span><span class="cx"> * Globalize some WordPress variables, because PHPUnit loads this file inside a function
</span><span class="cx"> * See: https://github.com/sebastianbergmann/phpunit/issues/325
</span><del>- *
- * These are not needed for WordPress 3.3+, only for older versions
-*/
-global $table_prefix, $wp_embed, $wp_locale, $_wp_deprecated_widgets_callbacks, $wp_widget_factory;
-
-// These are still needed
</del><ins>+ */
</ins><span class="cx"> global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer;
</span><span class="cx">
</span><span class="cx"> if ( !is_readable( $config_file_path ) ) {
</span></span></pre></div>
<a id="trunktestsphpunitmultisitexmlfromrev25158trunktestsmultisitexml"></a>
<div class="copfile"><h4>Copied: trunk/tests/phpunit/multisite.xml (from rev 25158, trunk/tests/multisite.xml) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/multisite.xml (rev 0)
+++ trunk/tests/phpunit/multisite.xml 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+<phpunit
+ bootstrap="includes/bootstrap.php"
+ backupGlobals="false"
+ colors="true"
+ >
+ <php>
+ <const name="WP_TESTS_MULTISITE" value="1" />
+ </php>
+ <testsuites>
+ <!-- Default test suite to run all tests -->
+ <testsuite>
+ <directory suffix=".php">tests</directory>
+ <exclude>tests/actions/closures.php</exclude>
+ <exclude>tests/image/editor.php</exclude>
+ <exclude>tests/image/editor_gd.php</exclude>
+ <exclude>tests/image/editor_imagick.php</exclude>
+ <file phpVersion="5.3.0">tests/actions/closures.php</file>
+ <file phpVersion="5.3.0">tests/image/editor.php</file>
+ <file phpVersion="5.3.0">tests/image/editor_gd.php</file>
+ <file phpVersion="5.3.0">tests/image/editor_imagick.php</file>
+ </testsuite>
+ </testsuites>
+ <groups>
+ <exclude>
+ <group>ajax</group>
+ </exclude>
+ </groups>
+</phpunit>
</ins></span></pre></div>
<a id="trunktestsphpunitwpmailrealtestphpfromrev25158trunktestswpmailrealtestphp"></a>
<div class="copfile"><h4>Copied: trunk/tests/phpunit/wp-mail-real-test.php (from rev 25158, trunk/tests/wp-mail-real-test.php) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/wp-mail-real-test.php (rev 0)
+++ trunk/tests/phpunit/wp-mail-real-test.php 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<?php
+/**
+ * wp-mail-real-test.php
+ *
+ * Test script for wp_mail with real addresses.
+ */
+
+// parse options
+$options = 'v:r:d';
+if (is_callable('getopt')) {
+ $opts = getopt($options);
+} else {
+ include( dirname(__FILE__) . '/wp-testlib/getopt.php' );
+ $opts = getoptParser::getopt($options);
+}
+
+define('DIR_TESTROOT', realpath(dirname(__FILE__)));
+
+define('TEST_WP', true);
+define('WP_DEBUG', array_key_exists('d', $opts) );
+
+if (!empty($opts['r']))
+ define('DIR_WP', realpath($opts['r']));
+else
+ if (!empty($opts['v']))
+ define('DIR_WP', DIR_TESTROOT.'/wordpress-'.$opts['v']);
+ else
+ define('DIR_WP', DIR_TESTROOT.'/wordpress');
+
+// make sure all useful errors are displayed during setup
+error_reporting(E_ALL & ~E_DEPRECATED);
+ini_set('display_errors', true);
+
+require_once(DIR_TESTROOT.'/wp-testlib/utils.php');
+
+// configure wp
+require_once(DIR_TESTROOT.'/wp-config.php');
+define('ABSPATH', realpath(DIR_WP).'/');
+
+// install wp
+define('WP_BLOG_TITLE', rand_str());
+define('WP_USER_NAME', rand_str());
+define('WP_USER_EMAIL', rand_str().'@example.com');
+
+// initialize wp
+define('WP_INSTALLING', 1);
+$_SERVER['PATH_INFO'] = $_SERVER['SCRIPT_NAME']; // prevent a warning from some sloppy code in wp-settings.php
+require_once(ABSPATH.'wp-settings.php');
+
+drop_tables();
+
+require_once(ABSPATH.'wp-admin/includes/upgrade.php');
+wp_install(WP_BLOG_TITLE, WP_USER_NAME, WP_USER_EMAIL, true);
+
+// make sure we're installed
+assert(true == is_blog_installed());
+
+define('PHPUnit_MAIN_METHOD', false);
+$original_wpdb = $GLOBALS['wpdb'];
+
+// hide warnings during testing, since that's the normal WP behaviour
+if ( !WP_DEBUG ) {
+ error_reporting(E_ALL ^ E_NOTICE);
+}
+
+$to = "To <wp.mail.testing@gmail.com>";
+$from = "From <wp.mail.testing+from@gmail.com>";
+$cc = "CC <wp.mail.testing+cc@gmail.com>";
+$bcc = "BCC <wp.mail.testing+bcc@gmail.com>";
+$subject = "RFC2822 Testing";
+$message = "My RFC822 Test Message";
+$headers[] = "From: {$from}";
+$headers[] = "CC: {$cc}";
+
+$_SERVER['SERVER_NAME'] = 'example.com';
+wp_mail( $to, $subject, $message, $headers );
+
+$headers = array();
+$subject = "RFC2822 Testing 2";
+$message = "My RFC822 Test Message 2";
+$to = "To <wp.mail.testing+to@gmail.com>";
+$headers[] = "BCC: {$bcc}";
+wp_mail( '', $subject, $message, $headers );
+echo "Test emails sent!\n"
+?>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestsphpunitxmldist"></a>
<div class="delfile"><h4>Deleted: trunk/tests/phpunit.xml.dist (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit.xml.dist 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/phpunit.xml.dist 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-<phpunit
- bootstrap="includes/bootstrap.php"
- backupGlobals="false"
- colors="true"
- >
- <testsuites>
- <!-- Default test suite to run all tests -->
- <testsuite>
- <directory suffix=".php">tests</directory>
- <exclude>tests/actions/closures.php</exclude>
- <exclude>tests/image/editor.php</exclude>
- <exclude>tests/image/editor_gd.php</exclude>
- <exclude>tests/image/editor_imagick.php</exclude>
- <file phpVersion="5.3.0">tests/actions/closures.php</file>
- <file phpVersion="5.3.0">tests/image/editor.php</file>
- <file phpVersion="5.3.0">tests/image/editor_gd.php</file>
- <file phpVersion="5.3.0">tests/image/editor_imagick.php</file>
- </testsuite>
- </testsuites>
- <groups>
- <exclude>
- <group>ajax</group>
- </exclude>
- </groups>
- <logging>
- <log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
- </logging>
-</phpunit>
</del></span></pre></div>
<a id="trunktestswpmailrealtestphp"></a>
<div class="delfile"><h4>Deleted: trunk/tests/wp-mail-real-test.php (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/wp-mail-real-test.php 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/wp-mail-real-test.php 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,85 +0,0 @@
</span><del>-<?php
-/**
- * wp-mail-real-test.php
- *
- * Test script for wp_mail with real addresses.
- */
-
-// parse options
-$options = 'v:r:d';
-if (is_callable('getopt')) {
- $opts = getopt($options);
-} else {
- include( dirname(__FILE__) . '/wp-testlib/getopt.php' );
- $opts = getoptParser::getopt($options);
-}
-
-define('DIR_TESTROOT', realpath(dirname(__FILE__)));
-
-define('TEST_WP', true);
-define('WP_DEBUG', array_key_exists('d', $opts) );
-
-if (!empty($opts['r']))
- define('DIR_WP', realpath($opts['r']));
-else
- if (!empty($opts['v']))
- define('DIR_WP', DIR_TESTROOT.'/wordpress-'.$opts['v']);
- else
- define('DIR_WP', DIR_TESTROOT.'/wordpress');
-
-// make sure all useful errors are displayed during setup
-error_reporting(E_ALL & ~E_DEPRECATED);
-ini_set('display_errors', true);
-
-require_once(DIR_TESTROOT.'/wp-testlib/utils.php');
-
-// configure wp
-require_once(DIR_TESTROOT.'/wp-config.php');
-define('ABSPATH', realpath(DIR_WP).'/');
-
-// install wp
-define('WP_BLOG_TITLE', rand_str());
-define('WP_USER_NAME', rand_str());
-define('WP_USER_EMAIL', rand_str().'@example.com');
-
-// initialize wp
-define('WP_INSTALLING', 1);
-$_SERVER['PATH_INFO'] = $_SERVER['SCRIPT_NAME']; // prevent a warning from some sloppy code in wp-settings.php
-require_once(ABSPATH.'wp-settings.php');
-
-drop_tables();
-
-require_once(ABSPATH.'wp-admin/includes/upgrade.php');
-wp_install(WP_BLOG_TITLE, WP_USER_NAME, WP_USER_EMAIL, true);
-
-// make sure we're installed
-assert(true == is_blog_installed());
-
-define('PHPUnit_MAIN_METHOD', false);
-$original_wpdb = $GLOBALS['wpdb'];
-
-// hide warnings during testing, since that's the normal WP behaviour
-if ( !WP_DEBUG ) {
- error_reporting(E_ALL ^ E_NOTICE);
-}
-
-$to = "To <wp.mail.testing@gmail.com>";
-$from = "From <wp.mail.testing+from@gmail.com>";
-$cc = "CC <wp.mail.testing+cc@gmail.com>";
-$bcc = "BCC <wp.mail.testing+bcc@gmail.com>";
-$subject = "RFC2822 Testing";
-$message = "My RFC822 Test Message";
-$headers[] = "From: {$from}";
-$headers[] = "CC: {$cc}";
-
-$_SERVER['SERVER_NAME'] = 'example.com';
-wp_mail( $to, $subject, $message, $headers );
-
-$headers = array();
-$subject = "RFC2822 Testing 2";
-$message = "My RFC822 Test Message 2";
-$to = "To <wp.mail.testing+to@gmail.com>";
-$headers[] = "BCC: {$bcc}";
-wp_mail( '', $subject, $message, $headers );
-echo "Test emails sent!\n"
-?>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestswptestsconfigsamplephp"></a>
<div class="delfile"><h4>Deleted: trunk/tests/wp-tests-config-sample.php (25164 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/wp-tests-config-sample.php 2013-08-29 16:49:43 UTC (rev 25164)
+++ trunk/tests/wp-tests-config-sample.php 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-<?php
-
-/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */
-define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/src/' );
-
-// Test with multisite enabled: (previously -m)
-// define( 'WP_TESTS_MULTISITE', true );
-
-// Force known bugs: (previously -f)
-// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
-
-// Test with WordPress debug mode on (previously -d)
-// define( 'WP_DEBUG', true );
-
-// ** MySQL settings ** //
-
-// This configuration file will be used by the copy of WordPress being tested.
-// wordpress/wp-config.php will be ignored.
-
-// WARNING WARNING WARNING!
-// These tests will DROP ALL TABLES in the database with the prefix named below.
-// DO NOT use a production database or one that is shared with something else.
-
-define( 'DB_NAME', 'yourdbnamehere' );
-define( 'DB_USER', 'yourusernamehere' );
-define( 'DB_PASSWORD', 'yourpasswordhere' );
-define( 'DB_HOST', 'localhost' );
-define( 'DB_CHARSET', 'utf8' );
-define( 'DB_COLLATE', '' );
-
-$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please!
-
-define( 'WP_TESTS_DOMAIN', 'example.org' );
-define( 'WP_TESTS_EMAIL', 'admin@example.org' );
-define( 'WP_TESTS_TITLE', 'Test Blog' );
-
-define( 'WP_PHP_BINARY', 'php' );
-
-define( 'WPLANG', '' );
</del></span></pre></div>
<a id="trunkwptestsconfigsamplephpfromrev25158trunktestswptestsconfigsamplephp"></a>
<div class="copfile"><h4>Copied: trunk/wp-tests-config-sample.php (from rev 25158, trunk/tests/wp-tests-config-sample.php) (0 => 25165)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-tests-config-sample.php (rev 0)
+++ trunk/wp-tests-config-sample.php 2013-08-29 18:39:34 UTC (rev 25165)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<?php
+
+/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */
+define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
+
+// Test with multisite enabled: (previously -m)
+// define( 'WP_TESTS_MULTISITE', true );
+
+// Force known bugs: (previously -f)
+// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
+
+// Test with WordPress debug mode on (previously -d)
+// define( 'WP_DEBUG', true );
+
+// ** MySQL settings ** //
+
+// This configuration file will be used by the copy of WordPress being tested.
+// wordpress/wp-config.php will be ignored.
+
+// WARNING WARNING WARNING!
+// These tests will DROP ALL TABLES in the database with the prefix named below.
+// DO NOT use a production database or one that is shared with something else.
+
+define( 'DB_NAME', 'yourdbnamehere' );
+define( 'DB_USER', 'yourusernamehere' );
+define( 'DB_PASSWORD', 'yourpasswordhere' );
+define( 'DB_HOST', 'localhost' );
+define( 'DB_CHARSET', 'utf8' );
+define( 'DB_COLLATE', '' );
+
+$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please!
+
+define( 'WP_TESTS_DOMAIN', 'example.org' );
+define( 'WP_TESTS_EMAIL', 'admin@example.org' );
+define( 'WP_TESTS_TITLE', 'Test Blog' );
+
+define( 'WP_PHP_BINARY', 'php' );
+
+define( 'WPLANG', '' );
</ins></span></pre>
</div>
</div>
</body>
</html>