diff --git a/config.authentication.php b/config.authentication.php index 5aba245..db5853b 100755 --- a/config.authentication.php +++ b/config.authentication.php @@ -45,7 +45,8 @@ return [ 'forgot_password_enabled' => true, // The database group to use for authentication - 'database_group' => 'default', + 'database_group' => 'pdo', + 'pdo_table_prefix' => '', // Password settings 'password_min_length' => 8, @@ -53,6 +54,9 @@ return [ 'password_algorithm' => PASSWORD_DEFAULT, 'password_options' => [], + // 2FA setting + 'enforce_2fa' => false, + // Email settings 'verifyEmailWithin' => 3600*24*3 ]; \ No newline at end of file diff --git a/test/base/PluginTest.php b/test/base/PluginTest.php index 59f9352..08d31e7 100644 --- a/test/base/PluginTest.php +++ b/test/base/PluginTest.php @@ -35,6 +35,7 @@ */ use FuzeWorks\Authentication\AuthenticationPlugin; +use FuzeWorks\ConfigORM\ConfigORM; use FuzeWorks\Factory; use PHPUnit\Framework\TestCase; @@ -46,11 +47,35 @@ class PluginTest extends TestCase public function setUp(): void { parent::setUp(); - $this->plugin = Factory::getInstance('plugins')->get('authentication'); + $this->plugin = Factory::getInstance('plugins')->get('auth'); } public function testFoundation() { $this->assertInstanceOf(AuthenticationPlugin::class, $this->plugin); } + + /** + * @depends testFoundation + */ + public function testGetConfig() + { + // Assert instance + $this->assertInstanceOf(ConfigORM::class, $this->plugin->getConfig()); + + // Assert contents + $this->assertEquals('auth', $this->plugin->getConfig()->get('auth_url')); + } + + /** + * @depends testGetConfig + */ + public function testGetAuthenticationUrl() + { + $this->assertEquals('/auth', $this->plugin->getAuthenticationUrl()); + } + + + + } \ No newline at end of file diff --git a/test/base/UsersModelTest.php b/test/base/UsersModelTest.php new file mode 100644 index 0000000..95bd496 --- /dev/null +++ b/test/base/UsersModelTest.php @@ -0,0 +1,71 @@ +get('auth'); + $this->usersModel = $plugin->users; + } + + public function testFoundation() + { + $this->assertInstanceOf(Users::class, $this->usersModel); + } + + /** + * @depends testFoundation + */ + public function testCreateUser() + { + + } + + +} \ No newline at end of file