Example #1
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\TabButton';
     parent::setUp();
     $this->item = $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Article')->getAdapter(current($this->loadTestEntities('articles')));
     $this->jooseBridge = $this->getMock('Psc\\CMS\\Item\\JooseBridge', array('setItem', 'link', 'autoLoad', 'html'), array($this->item), '', TRUE, TRUE, TRUE, $cloneArgs = FALSE);
 }
Example #2
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\HTML\\Page5';
     parent::setUp();
     $this->page5 = new Page5();
     $this->html = $this->page5->html();
 }
Example #3
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\DropBox2';
     parent::setUp();
     $this->tags = $this->loadTestEntities('tags');
     $this->dropBox = new DropBox2('tags', $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Tag'), array($this->tags['t1'], $this->tags['t2']), DropBox2::MULTIPLE);
 }
Example #4
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\LayoutManager';
     parent::setUp();
     $this->layoutManager = new LayoutManager(new \Psc\UI\UploadService('/', '/'));
     $this->pageContentStream = ContentSTream::create('de', 'page-content', 'default');
 }
Example #5
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\Component';
     $this->assertNotEmpty($this->componentClass, '$this->componentClass in setUp setzen!');
     $this->test->object = $this->component = $this->createComponent();
     parent::setUp();
 }
Example #6
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CSS\\Manager';
     parent::setUp();
     $this->manager = Manager::instance('test');
     $this->manager->register('css/some/test.css');
     $this->manager->enqueue('test');
 }
Example #7
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\DropBoxButton';
     $this->bridgedClass = 'Psc\\CMS\\Item\\DropBoxButtonable';
     parent::setUp();
     $this->item = $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Article')->getAdapter(current($this->loadTestEntities('articles')))->getDropBoxButtonable();
     $this->jooseBridge = $this->getMock('Psc\\CMS\\Item\\JooseBridge', array('setItem', 'link', 'autoLoad', 'html'), array($this->item));
 }
Example #8
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Item\\Adapter';
     parent::setUp();
     $this->entity = current($this->loadTestEntities('articles'));
     $this->entity->setId(7);
     $this->adapter = new Adapter($this->entity, $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Article'));
 }
Example #9
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\EntityGridPanel';
     parent::setUp();
     $this->entities = $this->loadTestEntities('users');
     $this->entityMeta = $this->getModule('Doctrine')->getEntityMeta('User');
     $this->entityGridPanel = new EntityGridPanel($this->entityMeta, $this->getTranslationContainer(), 'User Verwaltung');
 }
Example #10
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\EntityForm';
     parent::setUp();
     $this->entity = new \Psc\Doctrine\TestEntities\Person('Mr Roboto');
     $this->entity->setIdentifier($id = 17);
     $this->form = new EntityForm($this->entity, new RequestMeta('PUT', '/entities/persons/mr-roboto'));
 }
Example #11
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\GridPanel';
     parent::setUp();
     $this->gridPanel = new GridPanel('A nice Looking Panel for items in a Table', $this->getTranslationContainer());
     $this->gridPanel->createColumn('spalte1', $this->getType('String'));
     $this->gridPanel->createColumn('spalte2', $this->getType('Integer'));
     $this->gridPanel->createColumn('spalte3', $this->getType('Integer'), 'Spalte 3');
 }
Example #12
0
 public function setUp()
 {
     //$this->chainClass = 'Psc\UI\ComboDropBox2';
     parent::setUp();
     $this->relationEntityMeta = $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Tag');
     $this->avaibleItems = $this->relationEntityMeta->getAutoCompleteRequestMeta();
     //$this->entityMeta = $this->getEntityMeta('Psc\Doctrine\TestEntities\Article');
     $this->comboBox = new ComboBox2('tags', $this->avaibleItems, $this->relationEntityMeta);
     $this->dropBox = new DropBox2('tags', $this->relationEntityMeta, array());
     $this->comboDropBox = new ComboDropBox2($this->comboBox, $this->dropBox, 'Tags Pflegen');
 }
Example #13
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\Tabs2';
     parent::setUp();
     $deTitle = 'Willkommen';
     $enTitle = 'Welcome';
     $deContent = 'willkommen im Psc - CMS';
     $enContent = 'Welcome to Psc - CMS';
     $this->welcome = $this->doublesManager->createTemplateMock($deContent, $this->once());
     $this->welcome->mergeI18n(array('de' => array('title' => $deTitle), 'en' => array('title' => $enTitle)));
     $this->tabs = new Tabs2(array(), $this->welcome);
 }
Example #14
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\RightContent';
     parent::setUp();
     $this->dc = $this->getMock('Psc\\Doctrine\\DCPackage', array('getEntityMeta'), array(), '', FALSE);
     $this->cmsRightContent = new RightContent($this->dc, $this->getTranslationContainer());
     $this->dc->expects($this->any())->method('getEntityMeta')->will($this->returnValue($this->getEntityMeta('user', $this->getModule('Doctrine'))));
     $this->list = $this->getMock('Psc\\UI\\DropContentsList');
     $this->cmsRightContent->populateLists($this);
     // this tests implements DropContentsListCreater
     $this->entity = new UserEntity('*****@*****.**');
 }
Example #15
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Item\\RightContentLink';
     parent::setUp();
     $this->link = new RightContentLink(new \Psc\CMS\RequestMeta('GET', '/api/products/test/some/custom/action'), 'My Custom Action');
 }
Example #16
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\SplitPane';
     parent::setUp();
     $this->pane = new SplitPane(50, 'left-content', 'right-content');
 }
Example #17
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\Calendar';
     parent::setUp();
     $this->calendar = new Calendar();
 }
Example #18
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\SearchPanel';
     parent::setUp();
 }
Example #19
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\ComponentsForm';
     parent::setUp();
     $this->form = $this->createComponentsForm();
 }
Example #20
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\Component\\I18nWrapper';
     parent::setUp();
     //$this->i18nWrapper = new I18nWrapper();
 }
Example #21
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\HTML\\FrameworkPage';
     parent::setUp();
     $this->page = new FrameworkPage();
 }
Example #22
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\Button';
     parent::setUp();
     $this->button = new Button('a nice Button');
 }
Example #23
0
 public function setup()
 {
     parent::setup();
     $this->page = new Page();
 }
Example #24
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\JS\\jQueryTemplate';
     parent::setUp();
     $this->jQueryTemplate = new jQueryTemplate('<button type="button" class="page" rel="${page.num}">${page.num}</button>');
 }
Example #25
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\ComboBox2';
     parent::setUp();
     $this->entityMeta = $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Tag');
 }
Example #26
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\HTML\\WidgetBase';
     parent::setUp();
 }
Example #27
0
 protected function onNotSuccessfulTest(\Exception $e)
 {
     try {
         parent::onNotSuccessfulTest($e);
     } catch (\Exception $e) {
         if (isset($this->tester)) {
             print '------------ Acceptance (Fail) ------------' . "\n";
             print "\n";
             print $this->tester->getLog();
             print '------------ /Acceptance ------------' . "\n";
         }
     }
     throw $e;
 }
Example #28
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\UI\\PanelButtons';
     parent::setUp();
     $this->translationContainer = $this->createTranslationContainer($this->buildTranslations('cms')->locale('de')->trans('panel.buttons.save', 'speichern')->trans('panel.buttons.reload', 'neu laden')->trans('panel.buttons.close', 'schließen')->trans('panel.buttons.save-close', 'speichern und schließen')->trans('panel.buttons.insert', 'neu erstellen')->trans('panel.buttons.insert-open', 'neu erstellen und geöffnet lassen')->trans('panel.buttons.reset', 'zurücksetzen')->trans('panel.buttons.preview', 'vorschau')->locale('en')->trans('panel.buttons.save', 'save')->trans('panel.buttons.reload', 'reload')->trans('panel.buttons.close', 'close')->trans('panel.buttons.save-close', 'save and close')->trans('panel.buttons.insert', 'insert')->trans('panel.buttons.insert-open', 'save and open in new tab')->trans('panel.buttons.reset', 'reset')->trans('panel.buttons.preview', 'preview'));
 }
Example #29
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Item\\MetaAdapter';
     parent::setUp();
     $this->adapter = new MetaAdapter($this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Article'));
 }
Example #30
0
 protected function onNotSuccessfulTest(\Exception $e)
 {
     if (isset($this->em) && $this->em->getConnection()->isTransactionActive()) {
         $this->em->getConnection()->rollback();
     }
     parent::onNotSuccessfulTest($e);
 }