public function testWriteMore() { $mockTextFile = m::mock(TextFile::class); $mockTextFile->shouldReceive("writeMore")->with("hasan gilak")->once(); $mockTextFile->shouldReceive("extractAgainAllLinesIntoArray")->once(); $this->textChains->setFile($mockTextFile); $this->textChains->writeMore("hasan gilak"); }