Mr. Cotton decided to have himself tested for the coronavirus after learning that someone he knows outside the Port Authority had tested positive for it, according to a colleague who talked to Mr. Cotton on Monday.

He received the result of his test on Sunday night, said the colleague who did not have clearance to discuss the matter publicly beyond what was in the agency’s statement.

Mr. Cotton had not visited any of the Port Authority’s airports or other public facilities in the last few days. He worked at his office in the World Trade Center on Friday and met with some members of his staff there that night.

Some of those staff members were isolating themselves at home on Monday, but none were sick, Port Authority officials said. Senior officials who had worked near him were being tested for the coronavirus, the governor said.

A Port Authority spokeswoman said that agency employees who were in “close contact with him in recent days” were also working from home on Monday. She did not say how many employees that involved.

Mr. Cotton also attended a breakfast on Thursday morning at the Modern, a restaurant at the Museum of Modern Art in Midtown Manhattan. Known as the Excellence in Transportation breakfast, it is an annual event hosted by the Rudin Center for Transportation at New York University.

A spokeswoman for Union Square Hospitality, which operates The Modern, said that out of “an abundance of caution,” the restaurant would be closed on Monday evening for a “deep cleaning to fully sanitize the restaurant” before reopening on Tuesday.