public function testSetMethods() { $method1 = new Method('doSomething'); $method2 = new Method('doSomethingElse'); $method3 = new Method('doAnotherThing'); $this->class->addMethod($method1); $this->class->setMethods(array($method2, $method3)); $this->assertSame(array('doSomethingElse' => $method2, 'doAnotherThing' => $method3), $this->class->getMethods()); }