Ejemplo n.º 1
0
 /**
  * Get strings from files.
  */
 public function testGet()
 {
     $basedir = $this->createExamples();
     $strings = new CRM_Core_Resources_Strings(new CRM_Utils_Cache_Arraycache(NULL));
     $this->assertEquals(array('Hello from Javascript'), $strings->get('example', "{$basedir}/hello.js", "text/javascript"));
     $this->assertEquals(array('Hello from HTML'), $strings->get('example', "{$basedir}/hello.html", "text/html"));
 }
Ejemplo n.º 2
0
 /**
  * Flushes cached translated strings.
  * @return CRM_Core_Resources
  */
 public function flushStrings()
 {
     $this->strings->flush();
     return $this;
 }