17 require_once(
'./Services/WebAccessChecker/classes/class.ilWACPath.php');
18 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
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());
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());
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());
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());
TestCase for the ilWACCheckingInstanceTest.