
    Celina ROBERTS, as Personal Representative of the Estate of Nick Roberts, on behalf of the Estate of Nick Roberts, and on Behalf of Celina Roberts, individually, surviving parent, and on Behalf of Martin Roberts, individually, surviving parent, Appellant, v. CHILDREN’S MEDICAL SERVICES, a former division of the Florida Department of Health and Rehabilitative Services, now known as the Department of Children and Families, and, the Agency for Health Care Administration; Interim Healthcare, Inc.; Susan Personette; Judith Winans; and Lyn Jones, Appellees; Children’s Medical Services, a former division of the Florida Department of Health and Rehabilitative Services, now known as the Department of Children and Families, Appellant, v. Interim Healthcare, Inc., appellee.
    Nos. 98-04382, 98-04444.
    District Court of Appeal of Florida, Second District.
    Jan. 12, 2000.
    Lorain J. O’Neil, Winter Haven, and W. Clinton Wallace, Lakeland, for Appellant Celina Roberts.
    Charles W. Hall, St. Petersburg, and Charles Tyler Cone, Tampa, for Appellee Interim Healthcare, Inc.
    Edmund T. Woolfolk and John E. Du-bose, Jr., Orlando, for Appellee Children’s Medical Services.
    P. Raul Alvarez, Jr., Winter Park, for Appellees Susan Personette, Judith Win-ans and Lyn Jones.
   SALCINES, Judge.

This appeal has been brought by Celina Roberts, as Personal Representative of the Estate of Nick Roberts, on behalf of the Estate of Nick Roberts, and on behalf of Celina Roberts, individually, surviving parent, and on behalf of Martin Roberts, individually, surviving parent (hereinafter collectively “parents”), to challenge the trial court’s orders dismissing the parents’ amended complaint with prejudice as to Interim Healthcare, Inc. (“Interim”), Susan Personette, Judith Winans, and Lyn Jones (hereinafter collectively “foster parents”), and the final judgments entered in favor of interim and the foster parents. We reverse because the trial court erred in concluding that the doctrine of governmental immunity required dismissal with prejudice at a hearing on a motion to dismiss the amended complaint.

The facts of the present case involve the untimely death of a child born in 1985 with a congenital birth defect which immobilized him and necessitated the use of a ventilator to sustain his life. The child required constant monitoring to ensure that his airway remained clear and unblocked. For economic reasons, the parents were forced to contact the Florida Department of Health and Rehabilitative Services for assistance and the child was placed in a medical foster home. Due to a tragic chain of events, while the child was unattended in the medical foster home, his airway became blocked and he died.

The parents brought an action against Children’s Medical Services, Interim, and the foster parents for medical malpractice, negligent supervision, and for violation of section 409.175, Florida Statutes (Supp. 1996), relating to the licensure of family foster homes. Interim and the foster parents filed separate motions to dismiss asserting that they were immune from the civil lawsuit under the provisions of section 768.28, Florida Statutes (Supp.1996), because they were employees or agents of the State of Florida.

A hearing was conducted and, in ruling on the motions, the judge stated, “There is a fact that these foster care workers are indeed agents of the State, just because you don’t plead it does not mean that the expense of litigation needs to continue and everything else.” The trial court held that the parents were barred from bringing the present action against Interim and the foster parents by the governmental immunity provisions of section 768.28. The amended complaint was dismissed with prejudice. We conclude that this was error.

A motion to dismiss tests the legal sufficiency of a complaint to state a cause of action and is not intended to determine issues of ultimate fact. A trial court is required to confine itself strictly to the four corners of the complaint. See McWhirter, Reeves, McGothlin, Davidson, Rief & Bakas, P.A. v. Weiss, 704 So.2d 214, 215 (Fla. 2d DCA 1998). There is a clear distinction between a motion to dismiss and a motion for summary judgment. A motion to dismiss may not act as a substitute for summary judgment. See Holland v. Anheuser Busch, Inc., 643 So.2d 621, 622-623 (Fla. 2d DCA 1994).

The trial court was clearly without authority to look beyond the amended complaint to reach conclusions on the sufficiency of the evidence which the parties had yet to produce. Id., at 623. The trial court should not have inferred facts which had not been pleaded in the amended complaint. Because we are unable at this time to determine the likelihood of success by Interim or the foster parents on the issue of governmental immunity, the trial court was equally unable to reach the conclusion it did.

Accordingly, we reverse the final judgments entered for Interim, Susan Perso-nette, Judith Winans, and Lyn Jones, and' remand with directions for the trial court to quash the orders granting the motions to dismiss. Due to our disposition of this matter, the cross-appeal filed by Children’s Medical Services is moot.

Reversed and remanded with directions.

CAMPBELL, A.C.J., and PARKER, J., Concur. 
      
      . This court notes that pursuant to section 409.175(14)(a), Florida Statutes (Supp.1996), the Division of Risk Management of the Department of Insurance provides coverage to family foster homes through the Department of Children and Family Services. Section 409.175(14)(b) states that this statutory provision may not be construed as designating or not designating that a person who owns or operates a family foster home is an employee or agent of the state.
     