4 require_once(
'./libs/composer/vendor/autoload.php');
29 require_once(
'./Services/WebAccessChecker/classes/class.ilWACPath.php');
30 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
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());
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());
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());
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());
TestCase for the ilWACCheckingInstanceTest.