<?php declare(strict_types=1);

require_once __DIR__ . '/../../src/common/QrbLockedException.php';

use PHPUnit\Framework\TestCase;

final class QrbLockedExceptionTest extends TestCase
{

    public function testWithAdditionalInformationAndToString() : void
    {
        $e = new QrbException("QrbLockedExceptionTest", "localizeKey", "additionalInformation");
        
        $this->assertEquals("QrbLockedExceptionTest", $e->getMessage());        
        $this->assertEquals("localizeKey", $e->getLocalizeKey());        
        $this->assertEquals("additionalInformation", $e->getAdditionalInformation());
        
        echo $e . "\n";
    }

    public function testWithoutAdditionalInformation() : void
    {
        $e = new QrbException("QrbLockedExceptionTest", "localizeKey");
        
        $this->assertEquals("QrbLockedExceptionTest", $e->getMessage());        
        $this->assertEquals("localizeKey", $e->getLocalizeKey());        
        $this->assertEquals("", $e->getAdditionalInformation());        
    }
}

?>
