diff --git Gruntfile.js Gruntfile.js
index 8d4955f..de3c00b 100644
--- Gruntfile.js
+++ Gruntfile.js
@@ -137,6 +137,20 @@ module.exports = function(grunt) {
 		qunit: {
 			files: ['tests/qunit/**/*.html']
 		},
+		phpunit: {
+			default: {
+				cmd: 'phpunit',
+				args: ['-c', 'tests/phpunit/phpunit.xml.dist']
+			},
+			ajax: {
+				cmd: 'phpunit',
+				args: ['-c', 'tests/phpunit/phpunit.xml.dist', '--group', 'ajax']
+			},
+			multisite: {
+				cmd: 'phpunit',
+				args: ['-c', 'tests/phpunit/multisite.xml']
+			}
+		},
 		uglify: {
 			core: {
 				expand: true,
@@ -237,8 +251,15 @@ module.exports = function(grunt) {
 	grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'uglify:core',
 		'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);
 
-	// Testing task.
-	grunt.registerTask('test', ['qunit']);
+	// Testing tasks.
+	grunt.registerMultiTask('phpunit', function() {
+		grunt.util.spawn({
+			cmd: this.data.cmd,
+			args: this.data.args,
+			opts: {stdio: 'inherit'}
+		}, this.async());
+	});
+	grunt.registerTask('test', ['phpunit:default', 'qunit']);
 
 	// Default task.
 	grunt.registerTask('default', ['build']);
diff --git phpunit.xml.dist phpunit.xml.dist
deleted file mode 100644
index 2178ce2..0000000
--- phpunit.xml.dist
+++ /dev/null
@@ -1,28 +0,0 @@
-<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>
diff --git tests/phpunit/phpunit.xml.dist tests/phpunit/phpunit.xml.dist
new file mode 100644
index 0000000..c9ed498
--- /dev/null
+++ tests/phpunit/phpunit.xml.dist
@@ -0,0 +1,28 @@
+<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>
