create(); //Create the Process factory factory(Process::class)->create(); //Create the Dynaform factory factory(Dynaform::class)->create(); //Create the EmailServerModel factory factory(EmailServerModel::class)->create(); //Create the Application factory factory(Application::class)->create(); //Create the Delegation factory $delegation = factory(Delegation::class)->create(); //Create the AbeConfiguration factory $abeConfiguration = factory(AbeConfiguration::class)->create(); //Create the AbeConfiguration factory factory(AbeRequest::class)->create([ 'ABE_UID' => $abeConfiguration->ABE_UID, 'APP_UID' => $delegation->APP_UID, 'DEL_INDEX' => $delegation->DEL_INDEX, 'ABE_REQ_UID' => $abeConfiguration->ABE_UID ]); //Call the getAbeRequest method $res = AbeConfiguration::getAbeRequest($abeConfiguration->ABE_UID); //Assert the result is not empty $this->assertNotEmpty($res); //Assert the result is the one looked for $this->assertEquals($res['ABE_UID'], $abeConfiguration->ABE_UID); } /** * Tests the getAbeRequest method when the result is empty * * @covers \ProcessMaker\Model\AbeConfiguration::getAbeRequest() * @test */ public function it_should_test_the_get_abe_request_method_when_the_result_is_empty() { //Creates the Task factory factory(Task::class)->create(); //Creates the Process factory factory(Process::class)->create(); //Creates the Dynaform factory factory(Dynaform::class)->create(); //Creates the EmailServer factory factory(EmailServerModel::class)->create(); //Creates the Application factory factory(Application::class)->create(); //Creates the Delegation factory $delegation = factory(Delegation::class)->create(); //Creates the AbeConfiguration factory $abeConfiguration = factory(AbeConfiguration::class)->create(); //Creates the AbeConfiguration factory factory(AbeRequest::class)->create([ 'ABE_UID' => $abeConfiguration->ABE_UID, 'APP_UID' => $delegation->APP_UID, 'DEL_INDEX' => $delegation->DEL_INDEX, 'ABE_REQ_UID' => $abeConfiguration->ABE_UID ]); //Call the getAbeRequest method $res = AbeConfiguration::getAbeRequest(''); //Asserts the result has one record $this->assertEmpty($res); } }