diff --git a/core/tests/Drupal/DrupalStandardsListenerTest/DrupalStandardsListenerTest.php b/core/tests/Drupal/DrupalStandardsListenerTest/DrupalStandardsListenerTest.php
new file mode 100644
index 0000000..5cd23bb
--- /dev/null
+++ b/core/tests/Drupal/DrupalStandardsListenerTest/DrupalStandardsListenerTest.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\UnitTestCaseTest\UnitTestCaseTest.
+ */
+
+namespace Drupal\DrupalStandardsListenerTest;
+
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Provides a test for the namespace check in DrupalStandardsListener.
+ *
+ * @coversDefaultClass \Drupal\Tests\Standards\DrupalStandardsListener
+ * @group simpletest
+ */
+class DrupalStandardsListenerTest extends UnitTestCase {
+
+  /**
+   * Tests the endTest() method with an "invalid" test object.
+   *
+   * @covers ::endTest
+   * @expectedException PHPUnit_Framework_ExpectationFailedException
+   * @expectedExceptionMessage Test is not in the Drupal\Tests namespace.
+   */
+  public function testEndTest() {
+    // Get the result object.
+    $result = $this->getTestResultObject();
+
+    // This should throw the exception listed in the annotation.
+    $result->endTest($this, 0);
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
index 4bcc2e1..2d0ca52 100644
--- a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
+++ b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
@@ -16,6 +16,13 @@
 class DrupalStandardsListener extends \PHPUnit_Framework_BaseTestListener {
 
   /**
+   * Saves the classes that fail the namespace check.
+   *
+   * @var array
+   */
+  protected $namespaceCheckFailedClasses = array();
+
+  /**
    * Signals a coding standards failure to the user.
    *
    * @param \PHPUnit_Framework_TestCase $test
@@ -144,6 +151,24 @@ public function checkValidCoversForTest(\PHPUnit_Framework_TestCase $test) {
   }
 
   /**
+   * Checks that tests are in the Drupal\Tests namespace.
+   *
+   * @param \PHPUnit_Framework_Test $test
+   *   The test where we should insert our test failure.
+   */
+  protected function checkValidNamespaceForTest(\PHPUnit_Framework_Test $test) {
+    $class = get_class($test);
+    if (!in_array($class, $this->namespaceCheckFailedClasses) && strpos($class, 'Drupal\Tests\\', 0) !== 0) {
+      // For the unit test of this method we run endTest() twice, but we don't
+      // want to run this namespace check a second time as the test failure
+      // would go uncaught.
+      $this->namespaceCheckFailedClasses[] = $class;
+      $test->assertTrue(FALSE, 'Test is not in the Drupal\Tests namespace.');
+    }
+  }
+
+
+  /**
    * {@inheritdoc}
    */
   public function endTest(\PHPUnit_Framework_Test $test, $time) {
@@ -152,6 +177,7 @@ public function endTest(\PHPUnit_Framework_Test $test, $time) {
     // subclasses.
     if ($test instanceof \PHPUnit_Framework_TestCase) {
       $this->checkValidCoversForTest($test);
+      $this->checkValidNamespaceForTest($test);
     }
     elseif ($test instanceof \PHPUnit_Framework_TestSuite) {
       foreach ($test->getGroupDetails() as $tests) {
