mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Tests: Move loading the PO class to set_up_before_class().
This ensures that the class is loaded once before the first test of the test case class is run, and `require_once()` is not unnecessarily called for each test method individually. Follow-up to [1106/tests]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4,9 +4,16 @@
|
||||
* @group pomo
|
||||
*/
|
||||
class Tests_POMO_PO extends WP_UnitTestCase {
|
||||
function set_up() {
|
||||
parent::set_up();
|
||||
|
||||
public static function set_up_before_class() {
|
||||
parent::set_up_before_class();
|
||||
|
||||
require_once ABSPATH . '/wp-includes/pomo/po.php';
|
||||
}
|
||||
|
||||
public function set_up() {
|
||||
parent::set_up();
|
||||
|
||||
// Not so random wordpress.pot string -- multiple lines.
|
||||
$this->mail = 'Your new WordPress blog has been successfully set up at:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user