@@ -3,19 +3,17 @@ |
||
| 3 | 3 | namespace Fabrica\QA\Context; |
| 4 | 4 | |
| 5 | 5 | use Behat\Behat\Context\BehatContext; |
| 6 | -use Behat\Behat\Exception\PendingException; |
|
| 7 | 6 | use Behat\Gherkin\Node\PyStringNode; |
| 8 | -use Behat\Gherkin\Node\TableNode; |
|
| 7 | +use Fabrica\Bundle\CoreBundle\EventDispatcher\Event\ProjectEvent; |
|
| 8 | +use Fabrica\Bundle\CoreBundle\EventDispatcher\FabricaEvents; |
|
| 9 | 9 | use Fabrica\Models\Code\Email; |
| 10 | 10 | use Fabrica\Models\Code\Project; |
| 11 | 11 | use Fabrica\Models\Code\Role; |
| 12 | 12 | use Fabrica\Models\Code\User; |
| 13 | 13 | use Fabrica\Models\Code\UserRoleProject; |
| 14 | 14 | use Fabrica\Models\Code\UserSshKey; |
| 15 | -use Fabrica\Bundle\CoreBundle\EventDispatcher\Event\ProjectEvent; |
|
| 16 | -use Fabrica\Bundle\CoreBundle\EventDispatcher\FabricaEvents; |
|
| 17 | -use Fabrica\Tools\Programs\Git\Admin; |
|
| 18 | 15 | use Fabrica\QA\KernelFactory; |
| 16 | +use Fabrica\Tools\Programs\Git\Admin; |
|
| 19 | 17 | use Symfony\Component\Process\Process; |
| 20 | 18 | |
| 21 | 19 | class ApiContext extends BehatContext |
@@ -385,15 +385,25 @@ |
||
| 385 | 385 | ); |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | + /** |
|
| 389 | + * @param string $key |
|
| 390 | + */ |
|
| 388 | 391 | protected function setConfig($key, $value) |
| 389 | 392 | { |
| 390 | 393 | $this->run( |
| 394 | + |
|
| 395 | + /** |
|
| 396 | + * @param string $kernel |
|
| 397 | + */ |
|
| 391 | 398 | function ($kernel) use ($key, $value) { |
| 392 | 399 | $kernel->getContainer()->get('fabrica_core.config')->set($key, $value); |
| 393 | 400 | } |
| 394 | 401 | ); |
| 395 | 402 | } |
| 396 | 403 | |
| 404 | + /** |
|
| 405 | + * @param \Closure $code |
|
| 406 | + */ |
|
| 397 | 407 | private function run($code) |
| 398 | 408 | { |
| 399 | 409 | if (null === $this->kernelFactory) { |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | namespace Fabrica\QA; |
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
| 6 | +use Symfony\Component\Config\FileLocator; |
|
| 6 | 7 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 7 | 8 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
| 8 | -use Symfony\Component\Config\FileLocator; |
|
| 9 | 9 | |
| 10 | 10 | use Behat\Behat\Extension\ExtensionInterface; |
| 11 | 11 | |
@@ -47,6 +47,9 @@ |
||
| 47 | 47 | |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $realPath |
|
| 52 | + */ |
|
| 50 | 53 | public static function readFolderPackages($item, $realPath) |
| 51 | 54 | { |
| 52 | 55 | if (in_array($item, ['.', '..'])) { |
@@ -7,14 +7,8 @@ |
||
| 7 | 7 | |
| 8 | 8 | use Illuminate\Filesystem\Filesystem; |
| 9 | 9 | |
| 10 | -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
|
| 11 | -use Symfony\Component\Console\Input\InputInterface; |
|
| 12 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 13 | -use Symfony\Component\Console\Output\OutputInterface; |
|
| 14 | - |
|
| 15 | -use Fabrica\Models\Code\Project; |
|
| 16 | -use Fabrica\Bundle\CoreBundle\EventDispatcher\FabricaEvents; |
|
| 17 | 10 | use Fabrica\Bundle\CoreBundle\EventDispatcher\Event\ProjectEvent; |
| 11 | +use Fabrica\Models\Code\Project; |
|
| 18 | 12 | |
| 19 | 13 | /** |
| 20 | 14 | * |
@@ -335,6 +335,7 @@ |
||
| 335 | 335 | * Used by this class, and plugins, to execute shell commands. |
| 336 | 336 | * |
| 337 | 337 | * @param array ...$params |
| 338 | + * @param string $params |
|
| 338 | 339 | * |
| 339 | 340 | * @return bool |
| 340 | 341 | */ |
@@ -4,14 +4,14 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Fabrica\Helper\BuildInterpolator; |
| 6 | 6 | use Fabrica\Helper\MailerFactory; |
| 7 | -use Fabrica\Tools\Logging\BuildLogger; |
|
| 8 | 7 | use Fabrica\Models\Infra\Ci\Build; |
| 8 | +use Fabrica\Tools\Logging\BuildLogger; |
|
| 9 | 9 | use Fabrica\Tools\Plugin\Util\Factory as PluginFactory; |
| 10 | 10 | use Fabrica\Tools\Store\BuildErrorWriter; |
| 11 | 11 | use Fabrica\Tools\Store\Factory; |
| 12 | +use Psr\Log\LogLevel; |
|
| 12 | 13 | use Psr\Log\LoggerAwareInterface; |
| 13 | 14 | use Psr\Log\LoggerInterface; |
| 14 | -use Psr\Log\LogLevel; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * @author Ricardo Sierra <[email protected]> |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | |
| 6 | 6 | namespace Fabrica\Tools\Databases\Mysql; |
| 7 | 7 | |
| 8 | -use Fabrica\Tools\Bash; |
|
| 9 | - |
|
| 10 | 8 | /** |
| 11 | 9 | * Explorer Class using Mysqli |
| 12 | 10 | * |
@@ -123,7 +123,6 @@ |
||
| 123 | 123 | * Backup the whole database or just some tables |
| 124 | 124 | * Use '*' for whole database or 'table1 table2 table3...' |
| 125 | 125 | * |
| 126 | - * @param string $tables |
|
| 127 | 126 | */ |
| 128 | 127 | public function restoreDb() |
| 129 | 128 | { |
@@ -41,6 +41,9 @@ |
||
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param string $connectString |
|
| 46 | + */ |
|
| 44 | 47 | public function singleBackup($connectString) |
| 45 | 48 | { |
| 46 | 49 | $dockerRunCode = 'docker run \\'. |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | /** |
| 113 | 113 | * Make a request to Campfire. |
| 114 | 114 | * |
| 115 | - * @param $page |
|
| 115 | + * @param string $page |
|
| 116 | 116 | * @param null $data |
| 117 | 117 | * @return bool|mixed |
| 118 | 118 | */ |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Fabrica\Tools\Plugin; |
| 4 | 4 | |
| 5 | -use Fabrica\Tools\Builder; |
|
| 6 | 5 | use Fabrica\Models\Infra\Ci\Build; |
| 6 | +use Fabrica\Tools\Builder; |
|
| 7 | 7 | use Fabrica\Tools\Plugin; |
| 8 | 8 | |
| 9 | 9 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | /** |
| 97 | 97 | * Try and find the codeception YML config file. |
| 98 | 98 | * |
| 99 | - * @param $buildPath |
|
| 99 | + * @param string|null $buildPath |
|
| 100 | 100 | * @return null|string |
| 101 | 101 | */ |
| 102 | 102 | public static function findConfigFile($buildPath) |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | /** |
| 129 | 129 | * Run tests from a Codeception config file. |
| 130 | 130 | * |
| 131 | - * @return bool|mixed |
|
| 131 | + * @return boolean |
|
| 132 | 132 | * @throws \Exception |
| 133 | 133 | */ |
| 134 | 134 | protected function runConfigFile() |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Fabrica\Tools\Plugin; |
| 4 | 4 | |
| 5 | -use Fabrica\Tools\Builder; |
|
| 6 | 5 | use Fabrica\Models\Infra\Ci\Build; |
| 7 | -use Fabrica\Tools\Plugin\Util\TestResultParsers\Codeception as Parser; |
|
| 6 | +use Fabrica\Tools\Builder; |
|
| 8 | 7 | use Fabrica\Tools\Plugin; |
| 9 | -use Symfony\Component\Yaml\Parser as YamlParser; |
|
| 8 | +use Fabrica\Tools\Plugin\Util\TestResultParsers\Codeception as Parser; |
|
| 10 | 9 | use Fabrica\Tools\ZeroConfigPluginInterface; |
| 10 | +use Symfony\Component\Yaml\Parser as YamlParser; |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * Codeception Plugin - Enables full acceptance, unit, and functional testing. |