This commit is contained in:
Paula Quispe
2020-12-01 17:42:09 -04:00
64 changed files with 3587 additions and 1098 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace Tests\unit\workflow\engine\classes;
use Tests\TestCase;
use WorkspaceTools;
class WorkflowToolsTest extends TestCase
{
private $workspaceTools;
/**
* Method set up.
*/
public function setUp()
{
parent::setUp();
$this->workspaceTools = new WorkspaceTools('workflow');
}
/**
* Method tear down.
*/
public function tearDown()
{
parent::tearDown();
}
/**
* This test the addAsyncOptionToSchedulerCommands method.
* @test
* @covers \WorkspaceTools::addAsyncOptionToSchedulerCommands()
*/
public function it_should_test_addAsyncOptionToSchedulerCommands_method()
{
//method "WorkspaceTools::initPropel(true)" crashes all connections
$message = "WorkspaceTools::initPropel(true) crashes all connections";
$this->markTestIncomplete($message);
ob_start();
$this->workspaceTools->addAsyncOptionToSchedulerCommands(false);
$string = ob_get_clean();
$this->assertRegExp("/This was previously updated/", $string);
ob_start();
$this->workspaceTools->addAsyncOptionToSchedulerCommands(true);
$string = ob_get_clean();
$this->assertRegExp("/Adding \+async option/", $string);
}
}