コード例 #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');
 }
コード例 #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());
 }
コード例 #3
0
ファイル: UploadManagerTest.php プロジェクト: pscheit/psc-cms
 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();
 }
コード例 #4
0
 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());
 }
コード例 #5
0
ファイル: ProcessorTest.php プロジェクト: pscheit/psc-cms
 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);
 }
コード例 #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);
 }
コード例 #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)));
 }
コード例 #8
0
ファイル: RepositoryTest.php プロジェクト: pscheit/psc-cms
 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);
 }
コード例 #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;
 }
コード例 #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);
 }
コード例 #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));
         }
     }
 }
コード例 #12
0
ファイル: Acceptance.php プロジェクト: pscheit/psc-cms
 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;
 }
コード例 #13
0
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\FixturesManager';
     parent::setUp();
     $this->fixturesManager = new FixturesManager($this->em);
 }
コード例 #14
0
ファイル: HydratorTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     parent::setUp();
     $this->tagName = 'Psc\\Doctrine\\TestEntities\\Tag';
     $this->hydrator = new Hydrator($this->tagName, $this->dc);
 }
コード例 #15
0
 public function setUp()
 {
     parent::setUp();
     $this->episodes = new Fixture\Episodes();
 }
コード例 #16
0
ファイル: ArticleTest.php プロジェクト: pscheit/psc-cms
 public function tearDown()
 {
     parent::tearDown();
 }
コード例 #17
0
ファイル: UIPackageTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\CMS\\UIPackageTest';
     parent::setUp();
     $this->ui = new UIPackage(new ActionRouter($this->dc), $this->dc);
 }
コード例 #18
0
ファイル: EntityManagerTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->chainClass = 'Psc\\Doctrine\\Mocks\\EntityManager';
     parent::setUp();
     $this->emm = new \Psc\Doctrine\Mocks\EntityManager();
 }
コード例 #19
0
ファイル: DateTimeTypeTest.php プロジェクト: pscheit/psc-cms
 public function setUp()
 {
     $this->fixtures = new \Psc\Doctrine\TestEntities\TagsFixture();
     parent::setUp();
 }