file = stream_get_meta_data($tmpFile)['uri']; fclose($tmpFile); $tmpFile = fopen($this->file, 'w+'); fwrite($tmpFile, "\n"); fclose($tmpFile); $this->conf = new LAMCfgMain($this->file); } /** * Cleans up the environment after running a test. */ protected function tearDown(): void { $this->conf = null; //unlink($this->file); } /** * Mail related settings */ public function testMail() { $this->conf->mailEOL = 'unix123'; $this->conf->mailServer = 'server:123'; $this->conf->mailPassword = 'pwd123'; $this->conf->mailUser = 'user123'; $this->conf->save(); $this->conf = new LAMCfgMain($this->file); $this->assertEquals('unix123', $this->conf->mailEOL); $this->assertEquals('server:123', $this->conf->mailServer); $this->assertEquals('pwd123', $this->conf->mailPassword); $this->assertEquals('user123', $this->conf->mailUser); } }