Skip to content

Commit

Permalink
test: Constants tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TyIsI committed Dec 31, 2024
1 parent 123846e commit 564a60f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions tests/ConstantsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

/**
* Created by PhpStorm.
* User: Thomas
* Date: 11/12/2014
* Time: 3:28 PM.
*/

use app\constants\DateTime;
use app\constants\Errors;
use app\constants\StringLiterals;
use PHPUnit\Framework\TestCase;

class ConstantsTest extends TestCase {
public function test_DateTime_DATE_TIME_MIDNIGHT() {
$this->assertEquals('Y-m-d 00:00:00', DateTime::DATE_TIME_MIDNIGHT);
}

public function test_DateTime_DATE_TIME_SIMPLE() {
$this->assertEquals('Y-m-d H:i:s', DateTime::DATE_TIME_SIMPLE);
}

public function test_Errors_E_INVALID_PASSWORD_HASH() {
$this->assertEquals('Invalid password hash', Errors::E_INVALID_PASSWORD_HASH);
}

public function test_StringLiterals_AuthAccessDenied() {
$this->assertEquals('"Access Denied"', StringLiterals::AUTH_ACCESS_DENIED);
}

public function test_StringLiterals_AuthAccessGranted() {
$this->assertEquals('"Access Granted"', StringLiterals::AUTH_ACCESS_GRANTED);
}

public function test_StringLiterals_HTTP_PREFIX() {
$this->assertEquals('http://', StringLiterals::HTTP_PREFIX);
}

public function test_StringLiterals_HTTPS_PREFIX() {
$this->assertEquals('https://', StringLiterals::HTTPS_PREFIX);
}

protected function setUp(): void {
}

protected function tearDown(): void {
}
}

0 comments on commit 564a60f

Please sign in to comment.