public function testGetUrlGenerator() { $this->plugin->activate($this->puli); $manager = $this->plugin->getUrlGenerator(); $this->assertInstanceOf('Puli\\AssetPlugin\\Api\\UrlGenerator\\AssetUrlGenerator', $manager); $this->assertSame($manager, $this->plugin->getUrlGenerator()); }
public static function setUpBeforeClass() { while (false === @mkdir(self::$tempDir = sys_get_temp_dir() . '/puli-web-plugin/AbstractCommandHandlerTest' . rand(10000, 99999), 0777, true)) { } $puli = new Puli(self::$tempDir); $config = new PuliApplicationConfig($puli); $plugin = new AssetPlugin(); $plugin->activate($puli); self::$application = new ConsoleApplication($config); self::$formatter = new PlainFormatter(self::$application->getConfig()->getStyleSet()); }