In July 1996, David S. Baskin started working for Farr Associates, a behavioral science consulting firm based in High Point, North Carolina. Through about 461 client offices, Farr provides behavioral consulting services to individual clients, and conducts leadership and self-awareness seminars that are open to the public. Its largest client base is in North Carolina, but it also has offices in 41 other states and four foreign countries. Its clients are generally large businesses, often having multiple offices within a given state, province or country.
Farr provides its services through its employees called Consultants. Their work generally consists of providing behavioral science consulting to individual Farr clients and conducting leadership seminars developed by Farr that are open to the public at large. Consultants are usually trained by Farr, using a training system developed by Farr. However, Farr did not provide consulting training to Mr. Baskin because he had over 20 years of experience in the field, but he did receive some training as to the administration of Farr’s leadership program.
When a Farr Consultant is assigned to work with a client, the Consultant works very closely with that client, gaining a full understanding of the client’s business needs and cultivating close personal relationships with the client’s principle representatives. Consultants achieve such a rapport with the client companies through their employment with Farr.
As part of his employment contract with Farr, Mr. Baskin signed a non-compete agreement, which provided the following:
For the valuable consideration being provided to the Employee under this Agreement, the Employee covenants and agrees that during the term of this Agreement and for a period of three (3) years from the date the Employee’s employment with the Company is terminated, regardless of whether such termination *278is with or without cause, or is by mutual agreement, or is involuntary as to one of the parties hereto, the Employee will not directly or indirectly render to any current client or customer of the Company or to any client or customer who was a client or customer of the Company during the two (2) year period immediately preceding the termination date of the Employee’s employment with the Company, services of any kind similar to the services previously or presently rendered for such client or customer.
Mr. Baskin worked for Farr for about two years, providing behavioral science consulting to eight clients. On 2 October 1998, Mr. Baskin gave written notice of his resignation to Farr, to be effective in two week’s time. Upon leaving Farr, Mr. Baskin started the Baskin Group, Inc., which offers behavioral consulting services to interested businesses. He immediately began providing consulting services to J. A. Jones Construction Company, a client of Farr’s since 1988 that had worked directly with Mr. Baskin while he worked for Farr. A few other Farr clients have also been in contact with Mr. Baskin, although the parties disagree as to whether Mr. Baskin solicited their business.
On 12 March 1999, Farr brought an action seeking to enforce the non-compete agreement against Mr. Baskin and also asserting a claim that Mr. Baskin breached his employment contract by not providing sufficient advance notice of his resignation. On 19 March 1999, Farr moved for injunctive relief to stop Mr. Baskin from violating the terms of the non-compete agreement. Mr. Baskin moved to dismiss Farr’s complaint on the ground that it did not state a claim upon which relief could be granted. He also filed affidavits in opposition to Farr’s motion for a preliminary injunction.
Superior Court Judge Judson D. DeRamus denied Farr’s motion for injunctive relief, finding that Farr had failed to demonstrate a likelihood of success on the merits of the claim. Thereafter, Superior Court Judge Peter M. McHugh granted Mr. Baskin’s motion to dismiss regarding the claim based on the non-compete agreement, but denied Mr. Baskin’s motion with respect to the claim based on his failure to give adequate notice of his resignation. Farr appealed both orders to this Court. We consolidated the two appeals.
We first address Farr’s argument that the trial court erroneously dismissed this action, since the dismissal of an action is subject to more stringent rules than the grant of an injunction. Farr argues that the trial court committed reversible error in partially granting Mr. *279Baskin’s motion to dismiss because Farr’s complaint states on its face a claim for breach of an enforceable non-compete agreement.
A motion to dismiss under Rule 12(b)(6) tests the legal sufficiency of the complaint by presenting the question whether, as a matter of law, the allegations of the complaint are sufficient to state a claim upon which relief can be granted under some legal theory. See Hobbs v. N.C. Dep’t Hum. Res., 135 N.C. App. 412, 520 S.E.2d 595, 599 (1999). A motion to dismiss under Rule 12(b)(6) should not be granted “ ‘unless it appears to a certainty that plaintiff is entitled to no relief under any state of facts which could be proved in support of the claim.’ ” Id. (citing Isenhour v. Hutto, 350 N.C. 601, 604-05, 517 S.E.2d 121, 124 (1999)). As our Supreme Court has held, the “function of a motion to dismiss is to test the law of the claim, not the facts which support it.” White v. White, 296 N.C. 661, 667, 252 S.E.2d 698, 702 (1979).
In the case at bar, the question is whether the non-compete agreement is enforceable as a matter of law. If not, then the trial court properly granted Mr. Baskin’s motion to dismiss the claim.
Covenants not to compete between an employer and employee are “not viewed favorably in modern law.” Hartman v. W. H. Odell and Assocs., Inc., 117 N.C. App. 307, 311, 450 S.E.2d 912, 916 (1994), review denied, 339 N.C. 612, 454 S.E.2d 251 (1995). To be enforceable, a covenant must meet five requirements — it must be (1) in writing; (2) made a part of the employment contract; (3) based on valuable consideration; (4) reasonable as to time and territory; and (5) designed to protect a legitimate business interest of the employer. Id. at 311, 450 S.E.2d at 916. The reasonableness of a non-compete agreement is a matter of law for the court to decide. See id.
The record on appeal shows that the non-compete agreement meets two of the above requirements — it is in writing and is part of the employment contract. It also meets the third requirement because the promise of new employment is valuable consideration in support of a covenant not to compete. See Milner Airco, Inc. v. Morris, 111 N.C. App. 866, 869, 433 S.E.2d 811, 813 (1993). Our inquiry focuses on the last two requirements — whether the covenant is reasonable as to time and place, and whether it is designed to protect a legitimate business interest of the employer.
First we observe that the non-compete agreement in this case meets the requirement of being designed to protect Farr’s legitimate *280business interests. The protection of customer relations against misappropriation by a departing employee is well recognized as a legitimate interest of an employer. See United Laboratories Inc. v. Kuykenall, 322 N.C. 643, 651, 370 S.E.2d 375, 381 (1988). Farr’s work requires that its Consultants develop an intimate relationship with its clients. Because the clients grow to trust individual Farr employees, the clients may naturally want to continue that relationship even if the Consultant leaves Farr. However, should the Consultant maintain the relationship, Farr risks losing a customer. The danger of a departing employee “misappropriating” a client is indeed very real, since Farr’s Consultants develop not only close relationships with Farr’s clients, but gain knowledge of Farr’s business practices too. Following Kuykendall, we hold that Farr’s desire to keep its client base intact when its employees depart is a legitimate business interest.
However, we hold that the fourth part of the test from Hartman — -the time and territory restriction — is unreasonable on its face and the non-compete agreement is therefore unenforceable.
In evaluating reasonableness as to time and territory restrictions, we must consider each element in tandem — the two requirements are not independent and unrelated. See Hartman, 117 N.C. App. at 311-12, 450 S.E.2d at 916. Although either the time or the territory restriction, standing alone, may be reasonable, the combined effect of the two may be unreasonable. A longer period of time is acceptable where the geographic restriction is relatively small, and vice versa. See Jewel Box Stores v. Morrow, 272 N.C. 659, 158 S.E.2d 840 (1968).
We have previously held that time restrictions of a certain length are presumed unreasonable absent a showing of special circumstances. A five-year time restriction is the outer boundary which our courts have considered reasonable, and even so, five-year restrictions are not favored. See, e.g., Welcome Wagon Int'l, Inc. v. Pender, 255 N.C. 244, 120 S.E.2d 739 (1961) (holding a five-year restriction limited to one city was reasonable); Hartman, 117 N.C. App. at 315, 450 S.E.2d at 918 (holding that “only extreme conditions” will support a five-year non-compete agreement.) Accord Engineering Assoc., Inc. v. Pankow, 268 N.C. 137, 139, 150 S.E.2d 56, 58 (1966). Further, when a non-compete agreement reaches back to include clients of the employer during some period in the past, that look-back period must be added to the restrictive period to determine the real scope of the time limitation. See Prof. Liab. Consultants, Inc. v. Todd, 345 N.C. *281176, 478 S.E.2d 201 (1996) (adopting dissenting opinion of Smith, J., in 122 N.C. App. 212, 468 S.E.2d 578 (1996)), reh’ing denied, 345 N.C. 355, 483 S.E.2d 175 (1997)).
In the case at bar, the covenant restricts Mr. Baskin from providing services to Farr’s clients for a period of three years after leaving Farr. The restricted clients include those using Farr’s services at the date of termination and any client served by Farr within the two years preceding termination. The real time restriction of the non-compete agreement is therefore five years — three years after the date of termination plus the two-year look-back period. Although a five-year time restriction may be upheld, we must consider the length of the restriction with its geographical scope in order to determine its reasonableness.
To prove that a geographic restriction in a non-compete provision is reasonable, an employer must first show where its customers are located and that the geographic scope of the covenant is necessary to maintain those customer relationships. See Todd, 122 N.C. App. at 218, 468 S.E.2d at 582. The employer must show that the territory embraced by the covenant is no more than necessary to secure the protection of its business or good will. See A.E.P. Industries, Inc. v. McClure, 308 N.C. 393, 404, 302 S.E.2d 753, 761 (1983). In addition, our Supreme Court has recognized the validity of geographic restrictions that are limited not by area, but by a client-based restriction. See, e.g., Kuykendall, supra.
Both parties present arguments as to why the physical scope of the territorial restriction is or is not reasonable. However, the physical scope of the restriction is irrelevant since Mr. Baskin is not prevented from working in any particular locale. Specifically, we reject Mr. Baskin’s argument that the non-compete agreement is overly broad because it has no defined physical territorial limit at all. However, Farr’s use of its client base as a substitute for a physical limitation works to achieve an unreasonable effect in its own way.
In Hartman, supra, we set forth a six-part test to determine whether the geographic scope of a covenant not to compete is reasonable. The six factors are: (1) the area or scope of the restriction; (2) the area assigned to the employee; (3) the area where the employee actually worked; (4) the area in which the employer operated; (5) the nature of the business involved; and (6) the nature of the employee’s duty and his knowledge of the employer’s business operation. See Hartman, 117 N.C. App. at 312, 450 S.E.2d at 917. Although *282we do not apply this test to the physical scope of the covenant, since it is not an issue, we do adapt the test as being applicable to assess the client-based restriction.
Farr has approximately 461 offices in 41 states and four foreign countries — Canada, Mexico, Israel, and The Netherlands. Many of Farr’s clients have multiple offices within a given state, province or country. The covenant in question prevents Mr. Baskin from working for all of Farr’s current or recent clients, regardless of where the client is located, whether he had any contact with them, or whether he even knew about them. Although Mr. Baskin is not prevented from working in any particular locale, he is precluded from working with a number of businesses in a large number of cities throughout the world. The scope of the covenant is extreme, considering that Mr. Baskin only worked with a relatively small number of Farr’s clients.
We further note that the client-based restriction is unduly vague. The covenant does not define whether the term “client or customer” includes one-time attendees of a Farr workshop. And the covenant may extend to clients’ offices that never contacted Farr. If Farr worked for a client in one city, but that client has offices in other cities, the non-compete agreement ostensibly prevents Mr. Baskin from working for that client in any of its offices, not merely the office with which Farr once worked. Both of these factors work to expand the reach of the covenant.
Although Mr. Baskin knows Farr’s business practices, Farr’s main concern is that the Consultant makes business contacts with Farr’s clients — clients that may be lost when the Consultant leaves. Although Farr had a legitimate reason for wanting to prevent departing employees from misappropriating clients, the number of clients embraced by the covenant, as compared to the number of clients serviced by Mr. Baskin, is unreasonable.
We compare this case to Hartman, which held that where the primary concern is the employee’s knowledge of the customers, “the territory should only be limited to areas in which the employee made contacts during the period of his employment.” Hartman, 117 N.C. App. at 313, 450 S.E.2d at 917 (citation omitted). The geographic limitation of that case is analogous to the client-based limitation in the case at bar. The rule set forth in Hartman should apply with equal force here: a client-based limitation cannot extend beyond contacts made during the period of the employee’s employment.
*283Farr relies on three cases in which our Supreme Court held that a client-based geographical restriction was reasonable. In two of those cases, the Supreme Court upheld client-based restrictions which included clients the employee had not personally serviced; however, we find that the scope of the restriction in the case at bar is much broader than the restrictions contemplated in those cases. In Triangle Leasing Co., Inc. v. McMahon, 327 N.C. 224, 393 S.E.2d 854 (1990), the Supreme Court upheld a non-compete agreement forbidding a former employee from soliciting its clients anywhere within North Carolina, despite the fact that the employee’s contacts were limited to Wilmington. The sheer scope of the covenant in the case at bar makes it distinguishable from Triangle Leasing. In Kuykendall, supra, the Supreme Court upheld a client-based restriction limited to clients that the former employee either directly serviced, or those clients who were serviced by the employees working under the defendant. The scope of the prohibition was much smaller than in the case at bar, and was limited to clients that the former employee had intimate knowledge of. Finally in the third case, Whittaker Gen. Med. Corp. v. Daniel, 324 N.C. 523, 379 S.E.2d 824 (1989), the Supreme Court upheld a client-based restriction limited to clients that the former employee had personally worked with. Again, the client-based restriction in that case is much more limited than in the case at bar.1
We hold that the scope of the client-based territorial restriction in the case at bar is unreasonable, thereby rendering the non-compete agreement unenforceable. In addition, since time and territory restrictions are two parts to one inquiry, we find that the five-year time limitation lends further support to our holding that this non-compete agreement is unreasonably broad and therefore unenforceable. The trial court properly dismissed Farr’s claim that Mr. Baskin breached an enforceable non-compete agreement.
Having found for Mr. Baskin on the merits of Farr’s non-compete claim, we further uphold the trial court’s denial of Farr’s motion for preliminary injunction.
Judges HORTON and SMITH concur.