-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add some defense to ensure end users are running the correct version of PHP before loading the system. (#76) * Eliminate a race condition where another plugin or the theme created the session first. (#75) * Schedule a cron to auto-delete expired sessions. (#77) Closes #75, closes #76, closes #77, resolves #78.
- Loading branch information
Showing
6 changed files
with
201 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace EAMann\WPSession; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class DatabaseHandlerTest extends TestCase | ||
{ | ||
|
||
public function test_create() | ||
{ | ||
$handler = new DatabaseHandler(); | ||
|
||
$called = false; | ||
$callback = function($path, $name) use (&$called) { | ||
$this->assertEquals('path', $path); | ||
$this->assertEquals('name', $name); | ||
|
||
$called = true; | ||
}; | ||
|
||
$handler->create('path', 'name', $callback); | ||
|
||
$this->assertTrue($called); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters