diff --git a/phpcs.xml b/phpcs.xml index 0e3a1ee6c..864fa0e89 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -43,4 +43,8 @@ lib/* tests/* + + + tests/* + diff --git a/tests/phpunit/lock/ActionScheduler_OptionLock_Test.php b/tests/phpunit/lock/ActionScheduler_OptionLock_Test.php index ba8c5f344..63afa3101 100644 --- a/tests/phpunit/lock/ActionScheduler_OptionLock_Test.php +++ b/tests/phpunit/lock/ActionScheduler_OptionLock_Test.php @@ -13,7 +13,7 @@ public function test_instance() { public function test_is_locked() { $lock = ActionScheduler::lock(); - $lock_type = md5( rand() ); + $lock_type = md5( wp_rand() ); $this->assertFalse( $lock->is_locked( $lock_type ) ); @@ -23,7 +23,7 @@ public function test_is_locked() { public function test_set() { $lock = ActionScheduler::lock(); - $lock_type = md5( rand() ); + $lock_type = md5( wp_rand() ); $lock->set( $lock_type ); $this->assertTrue( $lock->is_locked( $lock_type ) ); @@ -31,7 +31,7 @@ public function test_set() { public function test_get_expiration() { $lock = ActionScheduler::lock(); - $lock_type = md5( rand() ); + $lock_type = md5( wp_rand() ); $lock->set( $lock_type );