protected function setUp() { $this->object = new ConcreteStandardModule1(); $validator = $this->getMockBuilder('Nethgui\\System\\Validator')->disableOriginalConstructor()->getMock(); $validator->expects($this->any())->method($this->anything())->will($this->returnValue($validator)); $platform = $this->getMockBuilder('Nethgui\\System\\PlatformInterface')->disableOriginalConstructor()->getMock(); $platform->expects($this->any())->method('createValidator')->will($this->returnValue($validator)); $this->object->setPlatform($platform); }