Exemplo n.º 1
0
 public function __construct(\Psc\Code\Test\Base $testCase, $name, Dir $root, array $paths = NULL, $mode = Project::MODE_SRC)
 {
     $this->name = $name;
     $this->root = $root;
     $this->hostConfig = $testCase->getHostConfig();
     $this->projectsFactory = new ProjectsFactory($this->hostConfig);
     $this->paths = $paths;
     $this->mode = $mode;
     parent::__construct($testCase, $fqn = 'Psc\\CMS\\Project');
 }
 public function __construct($testCase)
 {
     parent::__construct($testCase, $fqn = 'SerienLoader\\JDownloaderRPC');
     $this->mockAllMethods = TRUE;
     /* JDownloaderRPC behaviour */
     $packages = array();
     $grabberPackages = array();
     $this->hasPackage = function ($package) use(&$packages) {
         return array_key_exists($package, $packages);
     };
     $this->hasGrabberPackage = function ($package) use(&$grabberPackages) {
         return array_key_exists($package, $grabberPackages);
     };
     $this->confirmPackage = function ($packageName, JDownloaderPackage $package) use(&$packages) {
         $packages[$packageName] = $package;
     };
     $this->getPackage = function ($packageName) use(&$packages) {
         return isset($packages[$packageName]) ? $packages[$packageName] : NULL;
     };
     $this->addPackage = function (JDownloaderPackage $package) use(&$packages) {
         $packages[$package->getName()] = $package;
     };
 }
Exemplo n.º 3
0
 public function __construct(\Psc\Code\Test\Base $testCase)
 {
     parent::__construct($testCase, $fqn = 'Psc\\URL\\RequestDispatcher');
 }
 public function __construct(\Psc\Code\Test\Base $testCase, EntityManager $em)
 {
     $this->em = $em;
     parent::__construct($testCase, $fqn = 'Psc\\Doctrine\\EntityRepository');
 }