예제 #1
0
 public function assertChange($test, $initialValue, $finalValue, $msg = null)
 {
     if (yTest_isEqual($initialValue, $finalValue)) {
         $test->fail(($msg !== null ? $msg . "\n" : '') . 'Expected change on property ' . $this->infoName . ' did not happen, value=' . $finalValue);
     }
     if (!yTest_isEqual($finalValue, $this->value)) {
         $test->fail(($msg !== null ? $msg . "\n" : '') . 'failed to meet expected value of ' . $this->value . ' on ' . $this->infoName . ', final value: ' . $finalValue);
     }
 }
예제 #2
0
 public function assertChange($test, $initialValue, $finalValue, $elementDesc, $msg = null)
 {
     if (!yTest_isEqual($finalValue - $initialValue, $this->value)) {
         $diff = $finalValue - $initialValue;
         $test->fail(($msg !== null ? $msg . "\n" : '') . 'Expecting diff of ' . $this->value . ' for property ' . $this->propName . ' of ' . $elementDesc . ' ' . $this->getId() . ', got ' . $diff);
     }
 }