public function setUp()
 {
     // Used by \KJSencha\Service\ApiFactory::createService
     \Zend\Console\Console::overrideIsConsole(false);
     $sl = ServiceManagerFactory::getServiceManager();
     /* @var $manager DirectManager */
     $manager = $sl->get('kjsencha.direct.manager');
     /* @var $apiFactory \KJSencha\Direct\Remoting\Api\Api */
     $api = $sl->get('kjsencha.api');
     $this->controller = new DirectController($manager, $api);
     $this->request = new Request();
     $this->routeMatch = new RouteMatch(array('controller' => 'kjsencha_direct'));
     $this->event = new MvcEvent();
     $this->event->setRouteMatch($this->routeMatch);
     $this->controller->setEvent($this->event);
 }
Exemple #2
0
<?php

if (!($loader = @(include __DIR__ . '/../vendor/autoload.php')) && !($loader = @(include __DIR__ . '/../../../autoload.php'))) {
    throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
}
/* @var $loader \Composer\Autoload\ClassLoader */
$loader->add('KJSenchaTest\\', __DIR__);
$loader->add('KJSenchaTestAsset\\', __DIR__);
if (!($config = @(include __DIR__ . '/TestConfiguration.php'))) {
    $config = (require __DIR__ . '/TestConfiguration.php.dist');
}
\KJSenchaTest\Util\ServiceManagerFactory::setConfig($config);
 public function setUp()
 {
     $sl = ServiceManagerFactory::getServiceManager();
     $this->apiBuilder = $sl->get('kjsencha.apibuilder');
 }