PMCORE-2636

This commit is contained in:
Paula Quispe
2020-12-22 15:21:08 -04:00
parent 1c36a18904
commit 9f77a4d106
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
*