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