public function testCreateNewFile1()
 {
     $app = __setupApp();
     $console = new Console($app, true);
     $console->addCommands($app->config('additionalCommands'));
     file_put_contents($app->getTheme()->getBasePath() . 'test.txt', "test stuff");
     file_put_contents($app->getTheme()->getAppPath() . 'appfile.txt', "I shall not pass");
     $output = $console->run("skully:s3 \"git add --all\"");
     echo $output->fetch();
     $output = $console->run('skully:s3 "git commit -a -m \\"Test commit\\""');
     echo $output->fetch();
     $output = $console->run('skully:s3 "git push origin master"');
     echo $output->fetch();
     $this->assertTrue(true);
 }
Exemplo n.º 2
0
 protected function migrate()
 {
     ob_start();
     $console = new Console($this->app, true);
     $output = $console->run("skully:schema db:migrate test");
     ob_clean();
 }
Exemplo n.º 3
0
 protected function migrate()
 {
     ob_start();
     $argv = array('console', 'skully:schema', 'db:migrate');
     $consoleApp = new Console($this->app, true);
     array_shift($argv);
     try {
         $consoleApp->run(implode(' ', $argv));
     } catch (\Exception $e) {
         echo $e->getMessage();
     }
     ob_clean();
 }
Exemplo n.º 4
0
 public function testPackCommand()
 {
     $app = __setupApp();
     $console = new Console($app, true);
     $packedPath = FileHelper::replaceSeparators(realpath(__DIR__ . '/packerTest/packed.js'));
     if (file_exists($packedPath)) {
         unlink($packedPath);
     }
     $this->assertFalse(file_exists($packedPath));
     ob_get_clean();
     ob_start();
     $output = $console->run("skully:pack Commands/packerTest/packerTest.txt");
     // Cannot test this on Windows somehow, so just check if pack command is running.
     $this->assertNotEmpty($output);
 }