ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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 32 of file AlphanumericTest.php.

Member Function Documentation

◆ testFloatIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValue ( )

Definition at line 62 of file AlphanumericTest.php.

62 : void
63 {
64 $value = new Alphanumeric(6.0);
65
66 $this->assertSame(6.0, $value->getValue());
67 }

◆ testFloatIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 55 of file AlphanumericTest.php.

55 : void
56 {
57 $value = new Alphanumeric(6.0);
58
59 $this->assertSame('6', $value->asString());
60 }

◆ testIntegerIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValue ( )

Definition at line 48 of file AlphanumericTest.php.

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

◆ testIntegerIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 41 of file AlphanumericTest.php.

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

◆ testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 34 of file AlphanumericTest.php.

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

◆ testTextIsNotAlphanumericAndWillThrowException()

ILIAS\Data\AlphanumericTest::testTextIsNotAlphanumericAndWillThrowException ( )

Definition at line 69 of file AlphanumericTest.php.

69 : void
70 {
71 $this->expectNotToPerformAssertions();
72
73 try {
74 $value = new Alphanumeric('hello world');
75 } catch (ConstraintViolationException $exception) {
76 return;
77 }
78 $this->fail();
79 }

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