Beispiel #1
0
 public function testExecuteCommandCommandNotFoundException()
 {
     $root = new Root($this->environment);
     ob_start();
     $sigint = $root->executeCommand(['not:found', '--name', 'Michal']);
     $result = ob_get_clean();
     ob_flush();
     $this->assertEquals(1, $sigint);
     $this->assertEquals('Command not:found not found.', $result);
 }
 public function testDowngrade()
 {
     date_default_timezone_set('Europe/Warsaw');
     file_put_contents($this->environment->getRootPath() . '/count.txt', '1-2-3-');
     file_put_contents($this->environment->getRootPath() . '/migrate.txt', '20160301120032');
     $root = new Root($this->environment);
     ob_start();
     $sigint = $root->executeCommand(['migrate', '-o', 'downgrade']);
     $result = ob_get_clean();
     ob_flush();
     $data = file_get_contents($this->environment->getRootPath() . '/count.txt');
     $this->assertEquals('', $data);
 }