ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilWACPathTest Class Reference

TestCase for the ilWACCheckingInstanceTest. More...

+ Inheritance diagram for ilWACPathTest:
+ Collaboration diagram for ilWACPathTest:

Public Member Functions

 testMobs ()
 
 testUserImage ()
 
 testBlogInSec ()
 
 testSubfolders ()
 

Protected Member Functions

 setUp ()
 Setup. More...
 

Detailed Description

TestCase for the ilWACCheckingInstanceTest.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

needsInstalledILIAS

disabled disabled disabled

Definition at line 21 of file ilWACPathTest.php.

Member Function Documentation

◆ setUp()

ilWACPathTest::setUp ( )
protected

Setup.

Definition at line 27 of file ilWACPathTest.php.

28  {
29  require_once('./Services/WebAccessChecker/classes/class.ilWACPath.php');
30  require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
31 
32  //setup container for HttpServiceAware classes
33  /*
34  $container = new \ILIAS\DI\Container();
35  $container['http'] = function ($c) {
36  return Mockery::mock(GlobalHttpState::class);
37  };
38 
39 
40  $GLOBALS["DIC"] = $container; */
41 
42  parent::setUp();
43  }

◆ testBlogInSec()

ilWACPathTest::testBlogInSec ( )

Definition at line 75 of file ilWACPathTest.php.

76  {
77  $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/sec/ilBlog/blog_123/Header.mp4');
78  $this->assertEquals('ilBlog', $ilWacPath->getModuleType());
79  $this->assertEquals('./data/trunk/sec/ilBlog/', $ilWacPath->getModulePath());
80  $this->assertEquals('blog_123', $ilWacPath->getModuleIdentifier());
81  $this->assertEquals('Header.mp4', $ilWacPath->getAppendix());
82  $this->assertEquals('trunk', $ilWacPath->getClient());
83  $this->assertTrue($ilWacPath->isInSecFolder());
84  $this->assertTrue($ilWacPath->isStreamable());
85  $this->assertTrue($ilWacPath->isVideo());
86  $this->assertFalse($ilWacPath->isAudio());
87  }
Class ilWACPath.

◆ testMobs()

ilWACPathTest::testMobs ( )

Definition at line 46 of file ilWACPathTest.php.

47  {
48  $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/mobs/mm_270/Koeniz_Komturei1.jpg');
49  $this->assertEquals('mobs', $ilWacPath->getModuleType());
50  $this->assertEquals('mm_270', $ilWacPath->getModuleIdentifier());
51  $this->assertEquals('Koeniz_Komturei1.jpg', $ilWacPath->getAppendix());
52  $this->assertEquals('trunk', $ilWacPath->getClient());
53  $this->assertFalse($ilWacPath->isInSecFolder());
54  $this->assertFalse($ilWacPath->isStreamable());
55  $this->assertFalse($ilWacPath->isVideo());
56  $this->assertFalse($ilWacPath->isAudio());
57  }
Class ilWACPath.

◆ testSubfolders()

ilWACPathTest::testSubfolders ( )

Definition at line 90 of file ilWACPathTest.php.

91  {
92  $ilWacPathBase = new ilWACPath('http://trunk.local/data/trunk/lm_data/lm_123456/start.html');
93  $ilWacPathSub = new ilWACPath('http://trunk.local/data/trunk/lm_data/lm_123456/subfolder/image.png');
94  $this->assertEquals($ilWacPathBase->getModulePath(), $ilWacPathSub->getModulePath());
95  }
Class ilWACPath.

◆ testUserImage()

ilWACPathTest::testUserImage ( )

Definition at line 60 of file ilWACPathTest.php.

61  {
62  $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/usr_images/usr_6_small.jpg?t=63944');
63  $this->assertEquals('usr_images', $ilWacPath->getModuleType());
64  $this->assertEquals('./data/trunk/usr_images/', $ilWacPath->getModulePath());
65  $this->assertEquals(null, $ilWacPath->getModuleIdentifier());
66  $this->assertEquals('usr_6_small.jpg', $ilWacPath->getAppendix());
67  $this->assertEquals('trunk', $ilWacPath->getClient());
68  $this->assertFalse($ilWacPath->isInSecFolder());
69  $this->assertFalse($ilWacPath->isStreamable());
70  $this->assertFalse($ilWacPath->isVideo());
71  $this->assertFalse($ilWacPath->isAudio());
72  }
Class ilWACPath.

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