コード例 #1
0
 public function setUp()
 {
     $this->chainClass = __NAMESPACE__ . '\\EnvironmentContainer';
     parent::setUp();
     $_SERVER['HTTP_HOST'] = '';
     $this->container = new EnvironmentContainer(array('session.init' => FALSE));
 }
コード例 #2
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\LanguageChooser';
     parent::setUp();
     $this->chooser = new LanguageChooser(array('en', 'de'));
     $this->fallbackLanguage = 'en';
 }
コード例 #3
0
 public function setUp()
 {
     $this->chainClass = 'SerienLoader\\JDownloaderRPC';
     parent::setUp();
     $this->dispatcher = new RequestDispatcherBuilder($this);
     $this->expectResponseFor('20126', 'get/rcversion');
 }
コード例 #4
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\PHPExcel\\SimpleImporter';
     parent::setUp();
     $this->matrix1File = $this->getFile('excels/matrix1.xlsx');
     $this->matrix1['VariableName'] = array(2 => array('Names' => 'mode', 'Type' => 'counter', 'Initialize Value' => 1, 'Comment' => NULL), 3 => array('Names' => 'tmp', 'Type' => 'counter', 'Initialize Value' => 0, 'Comment' => NULL));
 }
コード例 #5
0
ファイル: ImageTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\Entities\\ContentStream\\Image';
     parent::setUp();
     $this->image = new Image('/sourcepath/in/db');
     $this->imageManager = $this->getMock('Psc\\Image\\Manager', array(), array(), '', FALSE);
     $this->imageEntity = $this->getMock('Psc\\Entities\\Image', array(), array(), '', FALSE);
 }
コード例 #6
0
ファイル: ActionMetaTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\ActionMeta';
     parent::setUp();
     $this->specificMeta = $this->actionMeta = new ActionMeta(ActionMeta::SPECIFIC, ActionMeta::GET, 'infos');
     $this->generalMeta = new ActionMeta(ActionMeta::GENERAL, ActionMeta::GET, 'list');
     $this->actionMetaWithoutsubResource = new ActionMeta(ActionMeta::SPECIFIC, ActionMeta::POST);
 }
コード例 #7
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Image\\ThumbnailTransformation';
     parent::setUp();
     $this->imagine = new \Imagine\Gd\Imagine();
     $this->bud = $this->imagine->open((string) $this->getFile('images/bud.jpg'));
     // 62x62
     $this->transformation = new ThumbnailTransformation();
 }
コード例 #8
0
ファイル: ActionTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Action';
     parent::setUp();
     $this->dc = $this->doublesManager->createDoctrinePackageMock();
     $this->entity = new Tag('nice-label');
     $this->entityMeta = $this->getMockBuilder('Psc\\CMS\\EntityMeta')->disableOriginalConstructor()->getMock();
     $this->specificAction = new Action($this->entity, ActionMeta::POST, 'relevance');
     $this->generalAction = new Action($this->entityMeta, ActionMeta::GET, 'infos');
 }
コード例 #9
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Item\\DeleteButtonableValueObject';
     parent::setUp();
     $this->deleteRequestMeta = $this->getMock('Psc\\CMS\\RequestMetaInterface');
     $this->tabRequestMeta = $this->getMock('Psc\\CMS\\RequestMetaInterface');
     $this->buttonLabel = 'a button';
     $this->fullButtonLabel = 'a button with a description';
     $this->leftIcon = NULL;
     $this->rightIcon = 'document';
 }
コード例 #10
0
ファイル: ContentStreamTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\Entities\\ContentStream\\ContentStream';
     parent::setUp();
     $this->cs = ContentStream::create('de');
     $this->headline1 = new Headline('Some Headline (H1)');
     $this->headline2 = new Headline('Some Other Headline (H1)');
     $this->lastcs1 = $this->paragraph = new Paragraph('the text of the paragraph can be spanned' . "\n" . 'along lines');
     $this->cs1 = ContentStream::create('de');
     $this->headline1->setContentStream($this->cs1);
     $this->headline2->setContentStream($this->cs1);
     $this->paragraph->setContentStream($this->cs1);
 }
コード例 #11
0
ファイル: PageTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\Entities\\Page';
     parent::setUp();
     $this->page = new Page('home');
     $this->revisionPage = new Page('revision-page');
     $this->deDefault = ContentStream::create('de', 'page-content', 'default', 'de-default');
     $this->frDefault = ContentStream::create('fr', 'page-content', 'default', 'default');
     $this->dePreview = ContentStream::create('de', 'page-content', 'preview-1', 'de-preview-1');
     $this->frPreview = ContentStream::create('fr', 'page-content', 'preview-1', 'fr-preview-1');
     $this->revisionPage->addContentStream($this->deDefault)->addContentStream($this->frDefault)->addContentStream($this->dePreview);
     foreach (array('de', 'fr') as $lang) {
         foreach (array('page-content', 'sidebar-content') as $type) {
             $this->page->addContentStream($this->contentStreams[$lang][$type] = ContentStream::create($lang, $type, $revision = 'default', $slug = $lang . '-' . $type));
         }
     }
 }
コード例 #12
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\SimpleRequestMeta';
     parent::setUp();
     $this->rm = new SimpleRequestMeta(RequestMetaInterface::GET, '/entities/tag/7');
 }
コード例 #13
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\PHPUnit\\InvokedAtMethodGroupIndexMatcher';
     parent::setUp();
 }
コード例 #14
0
ファイル: Base.php プロジェクト: pscheit/psc-cms
 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->test = new FrontendCodeTester($this);
     $this->doublesManager = new DoublesManager($this);
 }
コード例 #15
0
ファイル: HelperTest.php プロジェクト: webforge-labs/trello
 public function setUp()
 {
     parent::setUp();
     $this->helper = new Helper();
 }
コード例 #16
0
ファイル: CodeWriterTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\JS\\AST\\CodeWriter';
     parent::setUp();
     $this->writer = new CodeWriter();
 }
コード例 #17
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\PHPWord\\MainTemplate';
     parent::setUp();
 }