Domain\Teacher\TeacherRepositoryTest::test_restore PHP Method

test_restore() public method

public test_restore ( )
    public function test_restore()
    {
        $repo = App::make(TeacherRepository::class);
        $teacher = factory(Teacher::class)->create();
        $repo->delete($teacher->id);
        $restore = $repo->restore($teacher->id);
        $get = $repo->get($teacher->id);
        $this->assertEquals(1, $restore);
        $this->assertNull($get->deleted_at);
        $this->assertInstanceOf(Teacher::class, $get);
    }