Skip to content
Snippets Groups Projects
Commit 55af2816 authored by Erick Hitter's avatar Erick Hitter
Browse files

Prepare for tests

parent eb34ee4e
No related branches found
No related tags found
1 merge request!6Add tests
Pipeline #5038 failed with stages
in 3 minutes
include: include:
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/default.yml - remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/variables.yml
- remote: https://git-cdn.e15r.co/gitlab/ci/wordpress/-/raw/main/plugins/templates/cache.yml
- remote: https://git.ethitter.com/gitlab/ci/wordpress/-/raw/add/redis/plugins/templates/before-script-redis.yml
- remote: https://git.ethitter.com/gitlab/ci/wordpress/-/raw/add/redis/plugins/templates/matrix-redis.yml
<?php
/**
* Test plugin features.
*
* @package Redis_User_Session_Storage
*/
namespace Redis_User_Session_Storage\Tests\Inc;
use Redis_User_Session_Storage\Plugin;
use WP_Session_Tokens;
use WP_UnitTestCase;
/**
* @coversDefaultClass \Redis_User_Session_Storage\Plugin
*/
class TestPlugin extends WP_UnitTestCase {
protected $plugin;
public function set_up() {
// TODO: use reflection to make this more useful. Create a helper, stop initializing here.
$this->plugin = new Plugin( 0 );
}
public function test__construct() {
$this->assertInstanceOf( Plugin::class, $this->plugin );
$this->assertInstanceOf( WP_Session_Tokens::class, $this->plugin );
$this->assertEquals( 'wpruss', $this->plugin->prefix );
}
}
<?php
/**
* Class SampleTest
*
* @package Redis_User_Session_Storage
*/
/**
* Sample test case.
*/
class SampleTest extends WP_UnitTestCase {
/**
* A single example test.
*/
public function test_sample() {
// Replace this with some actual testing code.
$this->assertTrue( true );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment