98 : void
99 {
100 $ii = $this->createMock(InputInterface::class);
101 $ac = $this->createMock(AgentCollection::class);
102
103
104 $ii
105 ->method("hasOption")
106 ->willReturn(true);
107
108 $ii
109 ->method("getOption")
110 ->will($this->returnValueMap([
111 ["no-legacy-plugins", null],
112 ["legacy-plugin", "foobar"],
113 ["skip-legacy-plugin", null]
114 ]));
115
116 $this->agent_finder
117 ->expects($this->once())
118 ->method("getPluginAgent")
119 ->with("foobar")
120 ->willReturn($ac);
121
122 $agent = $this->has_agent->_getRelevantAgent($ii);
123
124 $this->assertEquals($ac, $agent);
125 }