langFile = new vfsStreamFile('language.php'); $lang->addChild($this->langFile); $this->filePath = vfsStream::url('lang/language.php'); $this->obj = new Language_WriteFile_Factory(); } public function testFactoryShouldReturnWriteFileObject() { $writeFile = $this->obj->factory($this->filePath); $this->assertInstanceOf(Language_WriteFile::class, $writeFile); } }