Beispiel #1
0
 public function testSetGetString()
 {
     $expectedString = __METHOD__;
     $this->_model->setString($expectedString);
     $actualString = $this->_model->getString();
     $this->assertEquals($expectedString, $actualString);
 }
Beispiel #2
0
 /**
  * @dataProvider processAjaxPostDataProvider
  */
 public function testProcessAjaxPost($originalText, $translatedText, $isPerStore = null)
 {
     $inputArray = array(array('original' => $originalText, 'custom' => $translatedText));
     if ($isPerStore !== null) {
         $inputArray[0]['perstore'] = $isPerStore;
     }
     $this->_model->processAjaxPost($inputArray);
     $model = new Mage_Core_Model_Translate_String();
     $model->load($originalText);
     try {
         $this->assertEquals($translatedText, $model->getTranslate());
         $model->delete();
     } catch (Exception $e) {
         Mage::logException($e);
         $model->delete();
     }
 }