Esempio n. 1
0
 /**
  * Tests offsetExists
  *
  * @author Nikos Dimopoulos <*****@*****.**>
  * @since  2012-10-30
  */
 public function testOffsetExists()
 {
     $language = $this->config['tr']['en'];
     $params = array('content' => $language);
     $translator = new PhTranslateAdapterNativeArray($params);
     $found = $translator->offsetExists('hi');
     $this->assertTrue($found, 'Translator key does not exist');
 }
 /**
  * Tests whether a key exists in the array with offsetExists
  *
  * @author Nikolaos Dimopoulos <*****@*****.**>
  * @since  2014-09-12
  */
 public function testOffsetExists()
 {
     $this->specify("The key does not exist with offsetExists", function () {
         $language = $this->config['en'];
         $params = ['content' => $language];
         $translator = new PhTTranslateAdapterNativeArray($params);
         $found = $translator->offsetExists('hi');
         expect($found)->true();
     });
 }