Merged in bugfix/PMCORE-3104 (pull request #8056)
PMCORE-3104 Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -96,9 +96,9 @@ class CasesMenuHighlightTest extends TestCase
|
||||
|
||||
// Check if the object is valid
|
||||
$this->assertNotEmpty($result);
|
||||
$this->assertArrayHasKey('item', $result[0]);
|
||||
$this->assertArrayHasKey('highlight', $result[0]);
|
||||
$this->assertEquals('CASES_SELFSERVICE', $result[0]['item']);
|
||||
$this->assertEquals(true, $result[0]['highlight']);
|
||||
$this->assertArrayHasKey('item', $result[7]);
|
||||
$this->assertArrayHasKey('highlight', $result[7]);
|
||||
$this->assertEquals('CASES_SELFSERVICE', $result[7]['item']);
|
||||
$this->assertEquals(true, $result[7]['highlight']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,18 @@ class CasesListTest extends TestCase
|
||||
return $delegation;
|
||||
}
|
||||
|
||||
/**
|
||||
* This test construct
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\CasesList::__construct()
|
||||
* @test
|
||||
*/
|
||||
public function it_test_construct()
|
||||
{
|
||||
$casesList = new CasesList();
|
||||
$this->assertInstanceOf(CasesList::class, $casesList);
|
||||
}
|
||||
|
||||
/**
|
||||
* This test getAllCounters
|
||||
*
|
||||
@@ -57,4 +69,29 @@ class CasesListTest extends TestCase
|
||||
$this->assertArrayHasKey('CASES_INBOX', $result);
|
||||
$this->assertArrayHasKey('CASES_DRAFT', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This test getAllCounters
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\CasesList::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\BatchRouting::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Canceled::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Completed::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Draft::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Inbox::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Participated::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Paused::atLeastOne()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::atLeastOne()
|
||||
* @test
|
||||
*/
|
||||
public function it_return_at_least_one()
|
||||
{
|
||||
$delegation = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$count = new CasesList();
|
||||
$result = $count->atLeastOne($delegation->USR_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
$firstItem = head($result);
|
||||
$this->assertArrayHasKey('item', $firstItem);
|
||||
$this->assertArrayHasKey('highlight', $firstItem);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user