ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Data\AlphanumericTest Class Reference
+ Inheritance diagram for ILIAS\Data\AlphanumericTest:
+ Collaboration diagram for ILIAS\Data\AlphanumericTest:

Public Member Functions

 testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString ()
 
 testIntegerIsAlphanumericValueAndCanBeConvertedToString ()
 
 testIntegerIsAlphanumericValue ()
 
 testFloatIsAlphanumericValueAndCanBeConvertedToString ()
 
 testFloatIsAlphanumericValue ()
 
 testTextIsNotAlphanumericAndWillThrowException ()
 

Detailed Description

Definition at line 18 of file AlphanumericTest.php.

Member Function Documentation

◆ testFloatIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValue ( )

Definition at line 48 of file AlphanumericTest.php.

48  : void
49  {
50  $value = new Alphanumeric(6.0);
51 
52  $this->assertSame(6.0, $value->getValue());
53  }

◆ testFloatIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 41 of file AlphanumericTest.php.

41  : void
42  {
43  $value = new Alphanumeric(6.0);
44 
45  $this->assertSame('6', $value->asString());
46  }

◆ testIntegerIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValue ( )

Definition at line 34 of file AlphanumericTest.php.

34  : void
35  {
36  $value = new Alphanumeric(6);
37 
38  $this->assertSame(6, $value->getValue());
39  }

◆ testIntegerIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 27 of file AlphanumericTest.php.

27  : void
28  {
29  $value = new Alphanumeric(6);
30 
31  $this->assertSame('6', $value->asString());
32  }

◆ testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 20 of file AlphanumericTest.php.

20  : void
21  {
22  $value = new Alphanumeric('hello');
23 
24  $this->assertSame('hello', $value->asString());
25  }

◆ testTextIsNotAlphanumericAndWillThrowException()

ILIAS\Data\AlphanumericTest::testTextIsNotAlphanumericAndWillThrowException ( )

Definition at line 55 of file AlphanumericTest.php.

55  : void
56  {
57  $this->expectNotToPerformAssertions();
58 
59  try {
60  $value = new Alphanumeric('hello world');
61  } catch (ConstraintViolationException $exception) {
62  return;
63  }
64  $this->fail();
65  }

The documentation for this class was generated from the following file: