public function setUp() { $this->randomStringGenerator = new TextGenerator(); $this->mockCaller = $this->getMockBuilder('Fakerino\\FakeData\\FakeDataInterface')->getMock(); $this->randomStringGenerator->setCaller($this->mockCaller); }