/** * @test */ public function onPluginAddShouldNotAddPluginIfPluginDoesNotHaveProfile() { $plugin = $this->getMock('Xi\\Filelib\\Plugin\\Plugin'); $plugin->expects($this->any())->method('belongsToProfile')->will($this->returnValue(false)); $this->fileProfile->onPluginAdd(new PluginEvent($plugin, $this->getMockedFilelib())); $this->assertNotContains($plugin, $this->fileProfile->getPlugins()); }