Beispiel #1
0
 public function testRpcRequestTranslationJsNonExistentKey()
 {
     $exception = $this->catchException(function () {
         CM_Model_Language::rpc_requestTranslationJs('foo');
     });
     $this->assertInstanceOf('CM_Exception_Invalid', $exception);
     /** @var CM_Exception_Invalid $exception */
     $this->assertSame('Language key not found', $exception->getMessage());
     $this->assertSame(['phrase' => 'foo'], $exception->getMetaInfo());
 }
Beispiel #2
0
 /**
  * @expectedException CM_Exception_Invalid
  * @expectedExceptionMessage Language key `foo` not found
  */
 public function testRpcRequestTranslationJsNonExistentKey()
 {
     CM_Model_Language::rpc_requestTranslationJs('foo');
 }