states('foreign_keys')->create(); $notes = new AppNotes(); $res = $notes->getNotes($appNotes->APP_UID); $this->assertNotEmpty($res); } /** * Review get total cases notes by cases * * @test */ public function it_test_get_total_case_notes() { $application = factory(Application::class)->create(); $appNotes = factory(AppNotes::class, 10)->states('foreign_keys')->create([ 'APP_UID' => $application->APP_UID ]); $notes = new AppNotes(); $total = $notes->getTotal($application->APP_UID); $this->assertEquals(10, $total); } }