I noticed in #1935922: Convert PhpStorage tests to phpunit it's doing a lot of this:

 /**
  * @file
- * Definition of Drupal\system\Tests\PhpStorage\FileStorageTest.
+ * Definition of Drupal\Tests\Component\PhpStorage\FileStorageTest.
  */
 
-namespace Drupal\system\Tests\PhpStorage;
+namespace Drupal\Tests\Component\PhpStorage;

Right now, we're only doing this for PHPUnit tests, but it probably makes sense to do this for all tests.

Comments

msonnabaum’s picture

I'm good with this if we want to do it. As I pointed out in the original PHPUnit issue, our move into the lib namespace was misguided, so it probably makes sense to move them all back to core/tests.

Crell’s picture

As long as we're still loading test classes with the same PSR-0-capable class loader as everything else, I don't really care enough to debate it either way.

Moving /core/lib tests out of system module, though, does generally bring a smile to my face.

dawehner’s picture

What is the proper placement for tests?

There is Drupal\Tests\Component\FooTest
and
Drupal\system\Tests\BarTest

Berdir’s picture

Hm, I'd say yes, but by converting them to PHPUnit, which is going to be a long term task :)

The current system actually seems to be a nice separation and makes it obvious what's still a Simpletest test. Moving them now would break an insane amount of patches, at a time where we can't afford that IMHO.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Here's what we ended up doing: https://www.drupal.org/docs/8/phpunit/phpunit-file-structure-namespace-a...

Calling this outdated.