public function testRemoveALine() { $mockTextFile = m::mock(TextFile::class); $mockTextFile->shouldReceive("removeALine")->with(1)->once(); $mockTextFile->shouldReceive("extractAgainAllLinesIntoArray")->once(); $this->textChains->setFile($mockTextFile); $this->textChains->removeALine(1); }