function testRegister() { $lib = $this->getMock('\\Bob\\TaskLibraryInterface'); $lib->expects($this->once())->method('register')->with($this->equalTo($this->application)); $this->application->register($lib); }