ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
StripTagsTest Class Reference
+ Inheritance diagram for StripTagsTest:
+ Collaboration diagram for StripTagsTest:

Public Member Functions

 testTransform ()
 
 testNoString ()
 

Protected Member Functions

 setUp ()
 

Private Attributes

const STRING_TO_STRIP = "I <script>contain</a> tags."
 
const EXPECTED_RESULT = "I contain tags."
 
Refinery $f
 
Transformation $strip_tags
 

Detailed Description

Definition at line 26 of file StripTagsTest.php.

Member Function Documentation

◆ setUp()

StripTagsTest::setUp ( )
protected

Definition at line 34 of file StripTagsTest.php.

34  : void
35  {
36  $this->f = new Refinery(
37  $this->createMock(DataFactory::class),
38  $language = $this->createMock(ILIAS\Language\Language::class)
39  );
40  $this->strip_tags = $this->f->string()->stripTags();
41  }
Interface Observer Contains several chained tasks and infos about them.

◆ testNoString()

StripTagsTest::testNoString ( )

Definition at line 49 of file StripTagsTest.php.

49  : void
50  {
51  $this->expectException(InvalidArgumentException::class);
52  $this->strip_tags->transform(0);
53  }

◆ testTransform()

StripTagsTest::testTransform ( )

Definition at line 43 of file StripTagsTest.php.

References $res.

43  : void
44  {
45  $res = $this->strip_tags->transform(self::STRING_TO_STRIP);
46  $this->assertEquals(self::EXPECTED_RESULT, $res);
47  }
$res
Definition: ltiservices.php:66

Field Documentation

◆ $f

Refinery StripTagsTest::$f
private

Definition at line 31 of file StripTagsTest.php.

◆ $strip_tags

Transformation StripTagsTest::$strip_tags
private

Definition at line 32 of file StripTagsTest.php.

◆ EXPECTED_RESULT

const StripTagsTest::EXPECTED_RESULT = "I contain tags."
private

Definition at line 29 of file StripTagsTest.php.

◆ STRING_TO_STRIP

const StripTagsTest::STRING_TO_STRIP = "I <script>contain</a> tags."
private

Definition at line 28 of file StripTagsTest.php.


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