/** * @param array $modelsDirs * @param \obo\Services\EntitiesInformation\Explorer $explorer * @param \obo\Interfaces\ICache $cache */ public function __construct(array $modelsDirs, \obo\Services\EntitiesInformation\Explorer $explorer, \obo\Interfaces\ICache $cache) { $this->explorer = $explorer; $this->cache = $cache; $this->modelsDirs = $modelsDirs; $this->lockFilePath = \obo\obo::tempDir() . "/cache.lock"; if (\obo\obo::$developerMode) { $this->validateCache(); } }
<?php // The Nette Tester command-line runner can be // invoked through the command: ../vendor/bin/tester . if (@(!(include __DIR__ . "/../vendor/autoload.php"))) { echo "Install Nette Tester using `composer update`"; exit(1); } // configure environment Tester\Environment::setup(); date_default_timezone_set("Europe/Prague"); \obo\obo::$developerMode = true; \obo\obo::setDefaultDataStorage(new \obo\DataStorage\MemoryStorage(["test" => ["id", "testProperty"]])); \obo\obo::setCache(new Obo\Tests\Cache(__DIR__ . DIRECTORY_SEPARATOR . "temp")); \obo\obo::setTempDir(__DIR__ . DIRECTORY_SEPARATOR . "temp"); \obo\obo::addModelsDirs([__DIR__ . DIRECTORY_SEPARATOR . "obo" . DIRECTORY_SEPARATOR . "Entities"]); \obo\obo::run(); function test(\Closure $function) { $function(); }