I assumed if it could be achieved it would be as follows:
- Code: Select all
id mockMyProtocol = [OCMockObject niceMockForProtocol:@protocol(MyProtocol)];
[mockMyProtocol expect] someClassMethodWithArgument:[OSMArg any]];
But the tests simply fail with the error:
*** -[NSProxy doesNotRecognizeSelector:someClassMethodWithArgument:] called!
I'm aware testing expectations of class methods is a relatively new feature so I can understand if this isn't supported yet, but thought I'd ask just in case.