Skip to content

Commit

Permalink
Config Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dutchie027 committed Apr 2, 2022
1 parent c6d5015 commit 4f967dd
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

declare(strict_types=1);

namespace dutchie027\Test\EasyMySQLBackup;

use dutchie027\EasyMySQLBackup\Config;
use PHPUnit\Framework\TestCase;

final class ConfigTest extends TestCase
{
/**
* @var object
*/
private $config;

protected function setUp(): void
{
$this->config = new Config();
}

public function testgetDBUser(): void
{
self::assertEquals('root', $this->config->getDBUser());
}

public function testgetDBPassword(): void
{
self::assertEquals('', $this->config->getDBPassword());
}

public function testgetLogDir(): void
{
self::assertEquals(sys_get_temp_dir(), Config::getLogDir());
}

public function testgetLogLevel(): void
{
self::assertEquals(100, Config::getLogLevel());
}

public function testgetLogPrefix(): void
{
self::assertEquals('easyMySQLBackup', Config::getLogPrefix());
}

public function testgetS3Region(): void
{
self::assertEquals('us-east-1', $this->config->getS3Region());
}

public function testgetS3Endpoint(): void
{
self::assertEquals('https://s3.us-east-1.amazonaws.com', $this->config->getS3Endpoint());
}

public function testgetS3ACL(): void
{
self::assertEquals('private', $this->config->getS3ACL());
}

public function testgetS3AccessKey(): void
{
self::assertEquals('', $this->config->getS3AccessKey());
}

public function testgetS3SecretKey(): void
{
self::assertEquals('', $this->config->getS3SecretKey());
}
}

0 comments on commit 4f967dd

Please sign in to comment.