public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Controller\\FileUploadController';
     parent::setUp();
     $this->controller = new FileUploadController(UploadManager::createForProject($this->getProject(), $this->dc));
     $this->cFile = $this->getCommonFile('Businessplan.docx');
 }
 public function setUp()
 {
     $this->con = 'tests';
     $this->chainClass = 'Psc\\Form\\DropBox2ValidatorRule';
     parent::setUp();
     $this->rule = new DropBox2ValidatorRule($this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Tag'), $this->getDoctrinePackage());
 }
Beispiel #3
0
 public function setUp()
 {
     $this->con = 'tests';
     $this->chainClass = 'Psc\\CMS\\UploadManager';
     parent::setUp();
     $this->manager = new UploadManager(NULL, $this->getDoctrinePackage(), UploadManager::createCache($this->dir = $this->getTestDirectory()->sub('tmp/')));
     $this->dir->create()->wipe();
 }
 public function setUp()
 {
     $this->chainClass = 'Psc\\Form\\SelectComboBoxValidatorRule';
     $this->con = 'tests';
     parent::setUp();
     $this->rule = new SelectComboBoxValidatorRule('Psc\\Doctrine\\TestEntities\\Tag', $this->getDoctrinePackage());
     $this->dcFixtures->add(new \Psc\Doctrine\TestEntities\TagsFixture());
 }
Beispiel #5
0
 public function setUp()
 {
     $this->con = 'tests';
     $this->chainClass = 'Psc\\Doctrine\\Processor';
     parent::setUp();
     $this->article = new TestEntities\Article('a1: Wahl in Russland: Wieder protestieren Zehntausende gegen Putin', 'Mit einer kilometerlangen Menschenkette haben Regierungsgegner in Moskau eine Woche vor der Präsidentenwahl gegen Kremlkandidat Wladimir Putin protestiert. "Russland ohne Putin!", forderten die Demonstranten auf dem 15,6 Kilometer langen Gartenring im Zentrum der Hauptstadt. Ziel der friedlichen Aktion war es, dass sich etwa 35.000 Menschen mit weißen Bändchen am Revers entlang des Rings als Zeichen ihrer geschlossenen Opposition an den Händen hielten. Es war die größte von mehreren landesweiten Protestaktionen "Für ehrliche Wahlen" am Wochenende.');
     $this->emm = $this->doublesManager->createEntityManagerMock($this->module, 'tests');
     $this->processor = new Processor($this->article, $this->emm);
 }
Beispiel #6
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Controller\\PageController';
     self::$setupDatabase = FALSE;
     parent::setUp();
     $this->languages = array('de');
     $this->language = 'de';
     $this->container = $this->getMockForAbstractClass('Psc\\CMS\\Roles\\AbstractContainer', array('Psc\\Test\\Controllers', $this->dc, $this->languages, $this->language), '', TRUE, TRUE, TRUE, array('getController'));
     $this->controller = new \Psc\Test\Controllers\PageController($this->dc, $this->container);
 }
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\EntityFormPanel';
     parent::setUp();
     $entity = new Person('Scheit');
     $entity->setFirstName('Philipp');
     $entity->setBirthday(new Date('21.11.1984'));
     $entity->setEmail('*****@*****.**');
     $this->panel = new EntityFormPanel('Person bearbeiten', $this->getTranslationContainer(), new EntityForm($entity, $this->getEntityMeta('Psc\\Doctrine\\TestEntities\\Person')->getSaveRequestMeta($entity)));
 }
Beispiel #8
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\EntityRepository';
     parent::setUp();
     $this->emm = $this->getEntityManagerMock();
     if (!isset($this->entityClass)) {
         $this->entityClass = 'Psc\\Doctrine\\TestEntities\\Tag';
     }
     $this->repository = $this->createRepository(NULL);
 }
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\PersistanceCollectionSynchronizer';
     $this->entityClass = 'Psc\\Doctrine\\TestEntities\\Article';
     $this->fixtures = array(new TestEntities\TagsFixture(), new TestEntities\ArticlesFixture());
     parent::setUp();
     $this->repository = $this->em->getRepository($this->entityClass);
     $this->tagRepository = $this->em->getRepository('Psc\\Doctrine\\TestEntities\\Article');
     $this->articleId = 1;
 }
 public function setUp()
 {
     parent::setUp();
     $this->annotationReader = $this->module->createAnnotationReader();
     $this->chainClass = 'Psc\\Code\\Generate\\AnnotationWriter';
     $this->parser = new DocParser();
     $this->parser->addNamespace('Doctrine\\ORM\\Mapping');
     // autoloading:
     class_exists('Psc\\Code\\Compile\\Annotations\\Compiled', true);
     class_exists('Psc\\Code\\Compile\\Annotations\\Property', true);
 }
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\Controller\\PageControllerHelper';
     parent::setUp();
     $this->helper = new PageControllerHelper();
     $this->page = new Page('home');
     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));
         }
     }
 }
Beispiel #12
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;
 }
Beispiel #13
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\FixturesManager';
     parent::setUp();
     $this->fixturesManager = new FixturesManager($this->em);
 }
Beispiel #14
0
 public function setUp()
 {
     parent::setUp();
     $this->tagName = 'Psc\\Doctrine\\TestEntities\\Tag';
     $this->hydrator = new Hydrator($this->tagName, $this->dc);
 }
 public function setUp()
 {
     parent::setUp();
     $this->episodes = new Fixture\Episodes();
 }
Beispiel #16
0
 public function tearDown()
 {
     parent::tearDown();
 }
Beispiel #17
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\UIPackageTest';
     parent::setUp();
     $this->ui = new UIPackage(new ActionRouter($this->dc), $this->dc);
 }
Beispiel #18
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\Mocks\\EntityManager';
     parent::setUp();
     $this->emm = new \Psc\Doctrine\Mocks\EntityManager();
 }
Beispiel #19
0
 public function setUp()
 {
     $this->fixtures = new \Psc\Doctrine\TestEntities\TagsFixture();
     parent::setUp();
 }