diff --git tests/phpunit/tests/formatting/WPSlash.php tests/phpunit/tests/formatting/WPSlash.php
new file mode 100644
index 000000000..01c97e8e0
--- /dev/null
+++ tests/phpunit/tests/formatting/WPSlash.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @group formatting
+ */
+class Tests_Formatting_WPSlash extends WP_UnitTestCase {
+
+	/**
+	 * @dataProvider data_wp_slash
+	 *
+	 * @ticket 42195
+	 *
+	 * @param string $value
+	 * @param string $expected
+	 */
+	public function test_wp_slash_with( $value, $expected ) {
+		$this->assertEquals( $expected, wp_slash( $value ) );
+	}
+
+	/**
+	 * Data provider for test_wp_slash().
+	 *
+	 * @return array {
+	 *     @type array {
+	 *         @type mixed  $value    The value passed to wp_slash().
+	 *         @type string $expected The expected output of wp_slash().
+	 *     }
+	 * }
+	 */
+	public function data_wp_slash() {
+		return array(
+			array( 123, '123' ),
+			array( 123.4, '123.4' ),
+			array( true, '1' ),
+			array( false, '0' ),
+		);
+	}
+
+
+}
\ No newline at end of file
