PMCORE-3898
This commit is contained in:
35
tests/unit/workflow/engine/classes/WorkspaceToolsTest.php
Normal file → Executable file
35
tests/unit/workflow/engine/classes/WorkspaceToolsTest.php
Normal file → Executable file
@@ -2,10 +2,45 @@
|
||||
|
||||
use ProcessMaker\Model\Application;
|
||||
use ProcessMaker\Model\Delegation;
|
||||
use Tests\CreateTestSite;
|
||||
use Tests\TestCase;
|
||||
|
||||
class WorkspaceToolsTest extends TestCase
|
||||
{
|
||||
use CreateTestSite;
|
||||
public $workspace;
|
||||
|
||||
/**
|
||||
* Call the setUp parent method
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
config(["system.workspace" => "new_site"]);
|
||||
$this->workspace = config("system.workspace");
|
||||
$this->createDBFile($this->workspace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the updateIsoCountry method
|
||||
*
|
||||
* @covers \WorkspaceTools::updateIsoCountry
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_upgrade_Iso_Country_method()
|
||||
{
|
||||
$workspaceTools = new WorkspaceTools($this->workspace);
|
||||
$workspaceTools->updateIsoCountry();
|
||||
|
||||
$result = ob_get_contents();
|
||||
$this->assertRegExp("/-> Update table ISO_COUNTRY Done/", $result);
|
||||
|
||||
$res = IsoCountry::findById('CI');
|
||||
// Assert the result is the expected
|
||||
$this->assertEquals('Côte d\'Ivoire', $res['IC_NAME']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the migrateCaseTitleToThreads method
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user