ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 31 of file AlphanumericTest.php.

Member Function Documentation

◆ testFloatIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValue ( )

Definition at line 61 of file AlphanumericTest.php.

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

◆ testFloatIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 54 of file AlphanumericTest.php.

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

◆ testIntegerIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValue ( )

Definition at line 47 of file AlphanumericTest.php.

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

◆ testIntegerIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 40 of file AlphanumericTest.php.

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

◆ testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 33 of file AlphanumericTest.php.

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

◆ testTextIsNotAlphanumericAndWillThrowException()

ILIAS\Data\AlphanumericTest::testTextIsNotAlphanumericAndWillThrowException ( )

Definition at line 68 of file AlphanumericTest.php.

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

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