Set up PHPUnit with WordPress: The WordPress tests are 3 - 4 years old; does it matter?

wordpress.stackexchange https://wordpress.stackexchange.com/questions/233553

  •  02-01-2021
  •  | 
  •  

سؤال

I'm trying to set up PHPUnit with WordPress, and the tutorial I found tells me to download this repository so that I can bootstrap the WordPress environment to run my tests. The only issue I have is that the repo was last changed 3 - 4 years ago, which is a long time.

I have also googled a little but, and found a guide for how to set up tests with PHPUnit in WebStorm, but that site were also linking to the same repo.

Does anyone have any experience using this, or using PHPUnit with WordPress?

هل كانت مفيدة؟

المحلول

That seems to be an old repo, you should use https://core.trac.wordpress.org/browser/trunk/tests. Obviously trunk should be used if you want to use the tests with 4.6. Not sure how much difference there is in the infrastructure between the version (in other words, it is unlikely that you care how core does a specific test, therefor the staleness of the core tests might not be an issue at all)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى wordpress.stackexchange
scroll top