getPath() public method

path가 주어질 경우, 주어진 path정보를 추가하여 반환한다.
public getPath ( string $path = '' ) : string
$path string path
return string
 /**
  * @depends testConstruct
  *
  * @param \Xpressengine\Plugin\PluginEntity $entity
  */
 public function testGetters($entity)
 {
     $this->assertEquals('title', $entity->getTitle());
     $this->assertEquals(__DIR__ . '/plugins/plugin_sample', $entity->getPath());
     $this->assertEquals('khongchi plugin.', $entity->getDescription());
     $this->assertCount(6, $entity->getSupport());
     $this->assertEquals('khongchi/plugin_sample', $entity->getName());
     $this->assertEquals(['xpressengine', 'board'], $entity->getKeywords());
     $this->assertEquals('khongchi', $entity->getAuthors()[0]['name']);
     $this->assertEquals('LGPL-2.0', $entity->getLicense());
 }
Esempio n. 2
0
 /**
  * getSkinFile
  *
  * @param PluginEntity $plugin
  * @param              $path
  * @param              $skinClass
  *
  * @return array|string
  * @throws \Exception
  */
 protected function getSkinFile(PluginEntity $plugin, $path, $skinClass)
 {
     $path = $path . "/{$skinClass}.php";
     if (file_exists($plugin->getPath($path))) {
         throw new \Exception("file[{$path}] already exists.");
     }
     return $path;
 }