Skip to content
Snippets Groups Projects
Commit de6b8294 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Move RandomTest to SimpleSAML\Test\Utils\RandomTest.

parent d4083071
No related branches found
No related tags found
No related merge requests found
<?php <?php
namespace SimpleSAML\Test\Utils;
use SimpleSAML\Utils\Random;
/** /**
* Tests for SimpleSAML\Utils\Random. * Tests for SimpleSAML\Utils\Random.
*/ */
class RandomTest extends PHPUnit_Framework_TestCase class RandomTest extends \PHPUnit_Framework_TestCase
{ {
/**
* Test for SimpleSAML\Utils\Random::generateID().
*
* @covers SimpleSAML\Utils\Random::generateID
*/
public function testGenerateID() public function testGenerateID()
{ {
// check that it always starts with an underscore // check that it always starts with an underscore
$this->assertStringStartsWith('_', SimpleSAML\Utils\Random::generateID()); $this->assertStringStartsWith('_', Random::generateID());
// check the length // check the length
$this->assertEquals(SimpleSAML\Utils\Random::ID_LENGTH, strlen(SimpleSAML\Utils\Random::generateID())); $this->assertEquals(Random::ID_LENGTH, strlen(Random::generateID()));
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment