Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
FileSystemContentSource.php
1 <?php
2 /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  *
10  */
11 class StaticLocalContentSourceTest extends CTestCase
12 {
13  protected $dynamicContent = '/Content.Node/Willkommen.de.html';
14 
15  /**
16  * @var FileSystemContentSource
17  */
18  protected $source;
19 
20  public function setUp()
21  {
22  Yii::app()->cache->flush();
23 
24  $this->source = new FileSystemContentSource();
25  $this->source->contentFolder = Yii::app()->getModule('contentSource')->sourceSettings['FileSystemContentSource']['contentFolder'];
26  }
27 
28  public function testGetContent()
29  {
30  $content = $this->source->getContent($this->dynamicContent);
31  $this->assertStringStartsWith('/', $content->getFile());
32 
33  $this->assertFalse($this->source->getContent($this->dynamicContent . '__'));
34  }
35 
36 }