ILIAS  release_7 Revision v7.30-3-g800a261c036
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 15 of file AlphanumericTest.php.

Member Function Documentation

◆ testFloatIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValue ( )

Definition at line 45 of file AlphanumericTest.php.

46  {
47  $value = new Alphanumeric(6.0);
48 
49  $this->assertSame(6.0, $value->getValue());
50  }

◆ testFloatIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testFloatIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 38 of file AlphanumericTest.php.

39  {
40  $value = new Alphanumeric(6.0);
41 
42  $this->assertSame('6', $value->asString());
43  }

◆ testIntegerIsAlphanumericValue()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValue ( )

Definition at line 31 of file AlphanumericTest.php.

32  {
33  $value = new Alphanumeric(6);
34 
35  $this->assertSame(6, $value->getValue());
36  }

◆ testIntegerIsAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testIntegerIsAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 24 of file AlphanumericTest.php.

25  {
26  $value = new Alphanumeric(6);
27 
28  $this->assertSame('6', $value->asString());
29  }

◆ testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString()

ILIAS\Data\AlphanumericTest::testSimpleStringIsCorrectAlphanumericValueAndCanBeConvertedToString ( )

Definition at line 17 of file AlphanumericTest.php.

18  {
19  $value = new Alphanumeric('hello');
20 
21  $this->assertSame('hello', $value->asString());
22  }

◆ testTextIsNotAlphanumericAndWillThrowException()

ILIAS\Data\AlphanumericTest::testTextIsNotAlphanumericAndWillThrowException ( )

Definition at line 52 of file AlphanumericTest.php.

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

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