/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->_paths = App::paths(); // Test case static reference. self::$_this = $this; if ($plugin = Reveal::plugin(Reveal::path(true))) { self::$plugin = $plugin; } self::buildTestAppPaths(); self::loadTestAppPlugins(); }
/** * Generate plugin's wiki uri. * * @param string $page Optional. Page's name. * @param string $repo Optional. Repository's name. * @return string Full uri to wiki's page. * @throws Exception * @todo replace Exception by custom one. */ public static function wiki($page = 'home', $repo = null) { if (empty($repo)) { try { $plugin = Reveal::plugin(Reveal::path(true)); } catch (Exception $e) { } if (empty($plugin)) { throw new Exception(); } $repo = 'gourmet/' . strtolower($plugin); } return sprintf('https://github.com/%s/wiki/%s', $repo, $page); }
public function testPath() { $result = Reveal::path(); $expected = CakePlugin::path('Common') . 'Lib' . DS . 'Reveal.php'; $this->assertEqual($result, $expected); $result = Reveal::path(0); $expected = __FILE__; $this->assertEqual($result, $expected); }