
749 So.2d 546 (2000)
HOSPITAL CONSTRUCTORS LTD., a Florida Limited Partnership, By and Through LIFEMARK HOSPITALS OF FLORIDA, INC., as General Partner, d/b/a Ami-Town and Country Medical Center, Appellant,
v.
Donald L. LEFOR and Betti Lefor, Appellees.
No. 98-02014.
District Court of Appeal of Florida, Second District.
January 7, 2000.
*547 H. Lawrence Hardy and Renee Jordan, Fort Lauderdale, for Appellant.
James J. Dowling, Palm Harbor, for Appellees.
SALCINES, Judge.
Hospital Constructors Ltd., by and through Lifemark Hospitals of Florida, Inc., as General Partner, d/b/a AMI-Town and Country Medical Center (the hospital), appeals the trial court's order which held that the hospital's claims were barred by the statute of limitations and dismissed the complaint with prejudice. We affirm in part and reverse in part.
On April 16, 1990, and May 3, 1990, the hospital provided Mr. Lefor with medical treatment. Payments were remitted to the hospital from, or on behalf of, Mr. Lefor commencing on or about March 1991, and continuing monthly through June 1993. On December 8, 1997, the hospital filed a five-count complaint. In counts one through four, the hospital asserted that Mr. Lefor had not paid for the services provided in 1990 and the balance was due. The fifth count alleged that Mrs. Lefor was liable for the unpaid medical bills as an unconditional guarantor in a written agreement. Lefors filed a motion to dismiss all counts asserting the actions were barred by the statute of limitations. The trial court granted the motion with prejudice.
A motion to dismiss for failure to state a cause of action tests the legal sufficiency of a complaint and the trial court must 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). All factual allegations of the complaint are considered to be true and must be construed in the light most favorable to the nonmoving party. See Caretta Trucking, Inc. v. Cheoy Lee Shipyards, Ltd., 647 So.2d 1028, 1030 (Fla. 4th DCA 1994).
The statute of limitations on a legal or equitable contract or obligation not founded on a written instrument is four years. See § 95.11(3)(k), Fla. Stat. (1990). When an action is based upon an obligation founded on a written instrument, the statute of limitations is five years. See § 95.11(2)(b), Fla. Stat. (1990). The payment of any part of the principal or interest of any obligation or liability founded on a written instrument tolls the running of the time under any statute of limitations. See § 95.051(1)(f), Fla. Stat. (1990). See *548 Chaplin v. Estate of Cooke, 432 So.2d 778, 779 (Fla. 1st DCA 1983).
The causes of action in counts one through four against Mr. Lefor were barred by the four year statute of limitation because the hospital did not base its allegations upon any written agreement made by him. We affirm the dismissal of these counts. However, the hospital's cause of action against Mrs. Lefor, which alleged that she was a guarantor in a written agreement, was not barred because the five year statute of limitation was tolled by the payments made to the hospital through June 1993. See § 95.051(1)(f). Therefore, based on the allegations, the cause of action against Mrs. Lefor as guarantor in count five was extended until June 1998. The dismissal of count five of the complaint is reversed and this matter is remanded for further proceedings.
Affirmed in part, reversed in part and remanded.
PARKER, A.C.J., and BLUE J., Concur.
