Ejemplo n.º 1
0
 public function test_get_all_raw_casstrings_session()
 {
     $sa = array('p:diff(sans)', 'q=int(tans)');
     foreach ($sa as $s) {
         $cs = new stack_cas_casstring($s);
         $cs->get_valid('t');
         $s1[] = $cs;
     }
     $cs1 = new stack_cas_session($s1, null, 0);
     $raw = 'Take @ 1/(1+x^2) @ and then @sin(z^2)@.';
     $at1 = new stack_cas_text($raw, $cs1, 0);
     $val = array('p:diff(sans)', 'q=int(tans)', '1/(1+x^2)', 'sin(z^2)');
     $this->assertEquals($val, $at1->get_all_raw_casstrings());
 }
 /**
  * @return array of CAS strings. These cas strings include the names of all
  * the input variables that are required by this node.
  */
 public function get_required_cas_strings()
 {
     $ct = new stack_cas_text($this->branches[0]['feedback'] . $this->branches[1]['feedback']);
     $requiredcasstrings = $ct->get_all_raw_casstrings();
     $requiredcasstrings[] = $this->sans->get_raw_casstring();
     $requiredcasstrings[] = $this->tans->get_raw_casstring();
     if ($this->process_atoptions() && trim($this->atoptions) != '') {
         $requiredcasstrings[] = $this->atoptions;
     }
     return $requiredcasstrings;
 }