Exemplo n.º 1
0
 /**
  *
  * @return multitype:\SplFileInfo \Symfony\Component\Finder\Finder
  *         \Symfony\Component\HttpFoundation\mixed
  */
 protected function getModel()
 {
     $model = parent::getModel();
     $model = $model['model'];
     $bundle = $model['bundle'];
     // $wsdlService = $this->container->get('SKITCBundleServiceWSDL');
     // $wsdl = $this->getRequest()->get('wsld');
     // $model['wsdlService']=$wsdlService;
     return array('model' => $model);
 }
 /**
  * (non-PHPdoc)
  *
  * @see \SK\ITCBundle\Controller\FilesystemController::getModel()
  */
 protected function getModel()
 {
     $model = parent::getModel();
     $model = $model['model'];
     $bundlesPhpunit = array();
     foreach ($model['bundles'] as $id => $bundle) {
         $bundlePhpUnitFile = sprintf("%s/%s", $bundle->getPath(), "phpunit.xml");
         $bundlePhpUnitInfo = new \SplFileInfo($bundlePhpUnitFile);
         $bundlesPhpunit[$bundle->getName()] = $bundlePhpUnitInfo;
     }
     $model['bundlesPhpunit'] = $bundlesPhpunit;
     $phpunit = sprintf("%s/%s", $model['path'], "phpunit.xml");
     $bundle = $model['bundle'];
     if (NULL != $bundle) {
         $phpunit = sprintf("%s/%s", $bundle->getPath(), "phpunit.xml");
     }
     if (is_file($phpunit)) {
         $configuration = \PHPUnit_Util_Configuration::getInstance($phpunit);
         $configuration->handlePHPConfiguration();
         $groups = $configuration->getTestSuiteConfiguration()->getGroupDetails();
         $model['configuration'] = $configuration;
         $model['groups'] = $groups;
         $model['group'] = $this->getRequest()->get('group', NULL);
         $model['suite'] = $this->getRequest()->get('suite', NULL);
         $model['test'] = $this->getRequest()->get('test', NULL);
         $model['case'] = $this->getRequest()->get('case', NULL);
         $model['phpunit'] = $phpunit;
         // $geshi = new \GeSHi(file_get_contents($phpunit), 'xml');
         // $geshi->parse_code();
     }
     return array('model' => $model);
 }
Exemplo n.º 3
0
 protected function getModel()
 {
     $model = parent::getModel();
     $model = $model['model'];
     $path = $this->getRequest()->get("path", NULL);
     $xmi = null;
     if ($path !== NULL) {
         $systemCommand = sprintf("phpuml %s", $path);
         $output = array();
         $xmi = "";
         if (exec($systemCommand, $output) || true) {
             foreach ($output as $line) {
                 $xmi .= $line;
             }
         }
     }
     $model['xmi'] = $xmi;
     return array('model' => $model);
 }