/**
  * Tests the JDaemon::writeProcessIdFile method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testWriteProcessIdFile()
 {
     // Get the current process id and set it to the daemon instance.
     $pid = (int) posix_getpid();
     $this->inspector->setClassProperty('processId', $pid);
     // Execute the writeProcessIdFile method.
     $this->inspector->writeProcessIdFile();
     // Check the value of the file.
     $this->assertEquals($pid, (int) file_get_contents($this->inspector->getClassProperty('config')->get('application_pid_file')), 'Line: ' . __LINE__);
     // Check the permissions on the file.
     $this->assertEquals('0644', substr(decoct(fileperms($this->inspector->getClassProperty('config')->get('application_pid_file'))), 1), 'Line: ' . __LINE__);
 }