ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
URLBuilderTokenTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\UI;
22
23use PHPUnit\Framework\TestCase;
24
25class URLBuilderTokenTest extends TestCase
26{
27 public function testConstruct(): void
28 {
29 $token = new URLBuilderToken(['test'], 'foo');
30 $this->assertInstanceOf(URLBuilderToken::class, $token);
31 $this->assertIsString($token->getToken());
32 $this->assertNotEmpty($token->getToken());
33 }
34
35 public function testTokenLength(): void
36 {
37 $token = new URLBuilderToken(['test'], 'foo');
38 $this->assertEquals(URLBuilderToken::TOKEN_LENGTH, strlen($token->getToken()));
39 }
40
41 public function testTokenName(): void
42 {
43 $token = new URLBuilderToken(['test'], 'foo');
44 $this->assertEquals('test_foo', $token->getName());
45 }
46}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$token
Definition: xapitoken.php:70