Esempio n. 1
0
 public function testGetDirectoryAvoidPluginsDirectory()
 {
     $dir = $this->getDir();
     mkdir($dir . '/wp-content');
     mkdir($dir . '/wp-content/plugins');
     mkdir($dir . '/wp-content/plugins/my-plugin');
     touch($dir . '/whippet.json');
     $result = \Dxw\Whippet\ProjectDirectory::find($dir . '/wp-content/plugins/my-plugin');
     $this->assertFalse($result->isErr());
     $this->assertInstanceOf('\\Dxw\\Whippet\\ProjectDirectory', $result->unwrap());
     $this->assertEquals($dir, $result->unwrap()->__toString());
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $this->factory = new \Dxw\Whippet\Factory();
     $this->projectDirectory = \Dxw\Whippet\ProjectDirectory::find(getcwd());
 }