From cf14306c2b3f82a81f8d56669a71633b4d4b5fce Mon Sep 17 00:00:00 2001
From: marvin-borner@live.com
Date: Mon, 16 Apr 2018 21:09:05 +0200
Subject: Main merge to user management system - files are now at /main/public/

---
 main/app/system/Bakery/Command/Test.php | 56 +++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100755 main/app/system/Bakery/Command/Test.php

(limited to 'main/app/system/Bakery/Command/Test.php')

diff --git a/main/app/system/Bakery/Command/Test.php b/main/app/system/Bakery/Command/Test.php
new file mode 100755
index 0000000..553fddd
--- /dev/null
+++ b/main/app/system/Bakery/Command/Test.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * UserFrosting (http://www.userfrosting.com)
+ *
+ * @link      https://github.com/userfrosting/UserFrosting
+ * @license   https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
+ */
+namespace UserFrosting\System\Bakery\Command;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputOption;
+use UserFrosting\System\Bakery\BaseCommand;
+
+/**
+ * Automated testing CLI tool.
+ * Sets up environment and runs PHPUnit tests in each Sprinkle.
+ *
+ * @author Alex Weissman (https://alexanderweissman.com)
+ */
+class Test extends BaseCommand
+{
+    /**
+     * @var string Path to the build/ directory
+     */
+    protected $buildPath;
+
+    /**
+     * {@inheritDoc}
+     */
+    protected function configure()
+    {
+        $this->setName("test")
+             ->setDescription("Run tests")
+             ->setHelp("Run php unit tests");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected function execute(InputInterface $input, OutputInterface $output)
+    {
+        $this->io->title("UserFrosting's Tester");
+
+        // Get command
+        $command = \UserFrosting\VENDOR_DIR . "/bin/phpunit --colors=always";
+        if ($output->isVerbose() || $output->isVeryVerbose()) {
+            $command .= " -v";
+        }
+
+        // Execute
+        $this->io->writeln("> <comment>$command</comment>");
+        passthru($command);
+    }
+}
\ No newline at end of file
-- 
cgit v1.2.3