ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

@group needsInstalledILIAS

Definition at line 11 of file ilWACPathTest.php.

Member Function Documentation

◆ setUp()

ilWACPathTest::setUp ( )
protected

Setup.

Definition at line 16 of file ilWACPathTest.php.

16 {
17 require_once('./Services/WebAccessChecker/classes/class.ilWACPath.php');
18 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
19 parent::setUp();
20 }

◆ testBlogInSec()

ilWACPathTest::testBlogInSec ( )

Definition at line 50 of file ilWACPathTest.php.

50 {
51 $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/sec/ilBlog/blog_123/Header.mp4');
52 $this->assertEquals('ilBlog', $ilWacPath->getModuleType());
53 $this->assertEquals('./data/trunk/sec/ilBlog/', $ilWacPath->getModulePath());
54 $this->assertEquals('blog_123', $ilWacPath->getModuleIdentifier());
55 $this->assertEquals('Header.mp4', $ilWacPath->getAppendix());
56 $this->assertEquals('trunk', $ilWacPath->getClient());
57 $this->assertTrue($ilWacPath->isInSecFolder());
58 $this->assertTrue($ilWacPath->isStreamable());
59 $this->assertTrue($ilWacPath->isVideo());
60 $this->assertFalse($ilWacPath->isAudio());
61 }
Class ilWACPath.

◆ testMobs()

ilWACPathTest::testMobs ( )

Definition at line 23 of file ilWACPathTest.php.

23 {
24 $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/mobs/mm_270/Koeniz_Komturei1.jpg');
25 $this->assertEquals('mobs', $ilWacPath->getModuleType());
26 $this->assertEquals('mm_270', $ilWacPath->getModuleIdentifier());
27 $this->assertEquals('Koeniz_Komturei1.jpg', $ilWacPath->getAppendix());
28 $this->assertEquals('trunk', $ilWacPath->getClient());
29 $this->assertFalse($ilWacPath->isInSecFolder());
30 $this->assertFalse($ilWacPath->isStreamable());
31 $this->assertFalse($ilWacPath->isVideo());
32 $this->assertFalse($ilWacPath->isAudio());
33 }

◆ testSubfolders()

ilWACPathTest::testSubfolders ( )

Definition at line 64 of file ilWACPathTest.php.

64 {
65 $ilWacPathBase = new ilWACPath('http://trunk.local/data/trunk/lm_data/lm_123456/start.html');
66 $ilWacPathSub = new ilWACPath('http://trunk.local/data/trunk/lm_data/lm_123456/subfolder/image.png');
67 $this->assertEquals($ilWacPathBase->getModulePath(), $ilWacPathSub->getModulePath());
68 }

◆ testUserImage()

ilWACPathTest::testUserImage ( )

Definition at line 36 of file ilWACPathTest.php.

36 {
37 $ilWacPath = new ilWACPath('http://trunk.local/data/trunk/usr_images/usr_6_small.jpg?t=63944');
38 $this->assertEquals('usr_images', $ilWacPath->getModuleType());
39 $this->assertEquals('./data/trunk/usr_images/', $ilWacPath->getModulePath());
40 $this->assertEquals(null, $ilWacPath->getModuleIdentifier());
41 $this->assertEquals('usr_6_small.jpg', $ilWacPath->getAppendix());
42 $this->assertEquals('trunk', $ilWacPath->getClient());
43 $this->assertFalse($ilWacPath->isInSecFolder());
44 $this->assertFalse($ilWacPath->isStreamable());
45 $this->assertFalse($ilWacPath->isVideo());
46 $this->assertFalse($ilWacPath->isAudio());
47 }

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