/**
  * @param ilLanguage $lng
  * @return ilTermsOfServiceSignableDocument
  * @throws ilTermsOfServiceNoSignableDocumentFoundException
  */
 public static function getByLanguageObject(ilLanguage $lng)
 {
     require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceFileSystemDocument.php';
     $document = new ilTermsOfServiceFileSystemDocument($lng);
     $document->determine();
     return $document;
 }
 /**
  * @param ilTermsOfServiceFileSystemDocument $document
  * @depends testInstanceCanBeCreated
  */
 public function testGlobalDocumentCouldBeRetrievedByEnglishLanguage(ilTermsOfServiceFileSystemDocument $document)
 {
     $this->skipIfvfsStreamNotSupported();
     vfsStream::newFile('agreement_en.html', 0777)->withContent('phpunit')->at($this->client_dir);
     file_put_contents(vfsStream::url('root/Customizing/global/agreement/agreement_en.html'), 'phpunit');
     $document->determine();
     $this->assertEquals('en', $document->getIso2LanguageCode());
     $this->assertTrue($document->hasContent());
     $this->assertEquals('phpunit', $document->getContent());
     $this->assertEquals(ilTermsOfServiceFileSystemDocument::SRC_TYPE_FILE_SYSTEM_PATH, $document->getSourceType());
     $this->assertEquals(vfsStream::url('root/Customizing/global/agreement/agreement_en.html'), $document->getSource());
 }