Exemplo n.º 1
0
 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');
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 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());
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 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)));
 }
Exemplo n.º 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);
 }
Exemplo n.º 9
0
 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;
 }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
 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));
         }
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 13
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\FixturesManager';
     parent::setUp();
     $this->fixturesManager = new FixturesManager($this->em);
 }
Exemplo n.º 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();
 }
Exemplo n.º 16
0
 public function tearDown()
 {
     parent::tearDown();
 }
Exemplo n.º 17
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\UIPackageTest';
     parent::setUp();
     $this->ui = new UIPackage(new ActionRouter($this->dc), $this->dc);
 }
Exemplo n.º 18
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\Mocks\\EntityManager';
     parent::setUp();
     $this->emm = new \Psc\Doctrine\Mocks\EntityManager();
 }
Exemplo n.º 19
0
 public function setUp()
 {
     $this->fixtures = new \Psc\Doctrine\TestEntities\TagsFixture();
     parent::setUp();
 }