Domain\Student\StudentRepositoryTest::test_delete PHP Method

test_delete() public method

public test_delete ( )
    public function test_delete()
    {
        $repo = App::make(StudentRepository::class);
        $student = factory(Student::class)->create();
        $delete = $repo->delete($student->id);
        $trashed = $repo->onlyTrashed()->get($student->id);
        $this->assertEquals(1, $delete);
        $this->assertInstanceOf(Carbon::class, $trashed->deleted_at);
        $this->assertInstanceOf(Student::class, $trashed);
        $this->setExpectedException(RepositoryException::class);
        $repo->withoutTrashed()->get($student->id);
    }