installed plugin WPScan version 1.15.1

This commit is contained in:
2021-05-13 11:27:50 +00:00
committed by Gitium
parent 2b403ab680
commit e0e2392c3c
193 changed files with 30878 additions and 0 deletions

View File

@ -0,0 +1,45 @@
<?php
/**
* Class ActionScheduler_Lock_Test
* @package test_cases\lock
*/
class ActionScheduler_OptionLock_Test extends ActionScheduler_UnitTestCase {
public function test_instance() {
$lock = ActionScheduler::lock();
$this->assertInstanceOf( 'ActionScheduler_Lock', $lock );
$this->assertInstanceOf( 'ActionScheduler_OptionLock', $lock );
}
public function test_is_locked() {
$lock = ActionScheduler::lock();
$lock_type = md5( rand() );
$this->assertFalse( $lock->is_locked( $lock_type ) );
$lock->set( $lock_type );
$this->assertTrue( $lock->is_locked( $lock_type ) );
}
public function test_set() {
$lock = ActionScheduler::lock();
$lock_type = md5( rand() );
$lock->set( $lock_type );
$this->assertTrue( $lock->is_locked( $lock_type ) );
}
public function test_get_expiration() {
$lock = ActionScheduler::lock();
$lock_type = md5( rand() );
$lock->set( $lock_type );
$expiration = $lock->get_expiration( $lock_type );
$current_time = time();
$this->assertGreaterThanOrEqual( 0, $expiration );
$this->assertGreaterThan( $current_time, $expiration );
$this->assertLessThan( $current_time + MINUTE_IN_SECONDS + 1, $expiration );
}
}