Merged in bugfix/PMCORE-2636 (pull request #7677)

PMCORE-2636

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2020-12-23 13:12:12 +00:00
committed by Julio Cesar Laura Avendaño
5 changed files with 89 additions and 0 deletions

View File

@@ -238,6 +238,27 @@ class SearchTest extends TestCase
$this->assertNotEmpty($result);
}
/**
* It tests web entry with negative appNumbers
*
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
* @test
*/
public function it_get_web_entry_not_submitted()
{
// Create factories related to the delegation cases
$cases = $this->createSearch();
$casesNotSubmitted = factory(Delegation::class, 5)->states('web_entry')->create();
// Create new Search object
$search = new Search();
// Set order by column value
$search->setOrderByColumn('APP_NUMBER');
$result = $search->getData();
// Review if the cases not submitted are not considered
$this->assertNotEmpty($result);
$this->assertEquals(count($result) , count($cases));
}
/**
* It tests the getCounter method
*