示例#1
0
	protected function setup()
	{
		parent::setup();
		$this->object = new FreezableObjectMock;
		$this->object->onFreeze[] = function($object) {
			$object->test .= "TRUE";
		};
	}
	public function setup()
	{
		parent::setup();
		$container = new \Nette\DI\Container;
		$container->params = array('productionMode' => FALSE, 'appDir' => __DIR__ . "/..");
		$container->addService('migrationConfiguration', new \Doctrine\DBAL\Migrations\Configuration\Configuration(
			new \Doctrine\DBAL\Connection(array(), new \Doctrine\DBAL\Driver\PDOSqlite\Driver)
		));
		$container = new \Nella\Doctrine\Container($container);
		$this->helper = new \Nella\Doctrine\MigrationConfigurationHelper($container);
	}
	public function setup()
	{
		parent::setup();
		$container = new \Nette\DI\Container;
		$container->params = array('productionMode' => FALSE, 'appDir' => __DIR__ . "/..");
		$container->addService('entityManager', \Doctrine\Tests\Mocks\EntityManagerMock::create(
			new \Doctrine\DBAL\Connection(array(), new \Doctrine\DBAL\Driver\PDOSqlite\Driver)
		));
		$this->dc = new \Nella\Doctrine\Container($container);
		$this->helper = new \Nella\Doctrine\EntityManagerHelper($this->dc);
	}
示例#4
0
	public function setup()
	{
		parent::setup();
		$this->context->params['namespaces'] = array('App', 'NellaTests\Application\UI', 'Nella');
		$this->context->params['templates'] = array(
			$this->context->params['appDir'],
			__DIR__,
			NELLA_FRAMEWORK_DIR,
		);
		$this->presenter = new Presenter\PresenterMock;
		$this->presenter->setContext($this->context);
	}
示例#5
0
	public function setup()
	{
		parent::setup();
		$this->helper = new \Nella\DI\ContainerHelper($this->context);
	}
示例#6
0
	public function setup()
	{
		parent::setup();
		$this->cache = new \Nella\Doctrine\Cache(new \Nette\Caching\Storages\MemoryStorage);
	}
示例#7
0
	public function setUp()
	{
		parent::setup();
		$this->storage = new \Nella\Localization\Storages\Gettext(__DIR__ . "/GettextTest.mo");
	}
示例#8
0
	public function setup()
	{
		parent::setup();
		$this->context->params['namespaces'] = array('App', 'Nella');
		$this->loader = new \Nella\Application\PresenterFactory($this->context);
	}
	public function setup()
	{
		parent::setup();
		$this->container = new \Nella\Application\UI\ComponentContainer;
	}
示例#10
0
	public function setup()
	{
		parent::setup();
		$this->arr = new \Nella\FreezableArray;
		$this->arr['foo'] = "bar";
	}
示例#11
0
	public function setup()
	{
		parent::setup();
		$this->presenter = new BackendPresenter\PresenterMock;
		$this->presenter->setContext($this->context);
	}