Example #1
0
 public function testPropertyAssign()
 {
     $t = new \Test\Assign();
     $this->assertTrue($t->testPropertyIncr1() === 2);
     $this->assertTrue($t->testPropertyAddAssign1() === 2);
     $this->assertTrue($t->testPropertyAddAssign2() === 3);
     $this->assertTrue($t->testPropertyAssignValuePlus1() === 2);
     $this->assertTrue($t->testPropertyDecr() === 1);
     $this->assertTrue($t->testPropertySubAssign1() === -2);
     $this->assertTrue($t->testPropertySubAssign2() === -1);
     $this->assertTrue($t->testPropertyMulAssign1() === 2);
     $this->assertTrue($t->testPropertyMulAssign2() === 3);
     $this->assertTrue($t->testPropertyAssignStringConcat() === 'test string');
     $this->assertTrue($t->testArrayVarAssign1('test_index', 'value') == array('test_index' => 'value'));
     $this->assertTrue($t->testArrayVarAssign2('test_index', 'value') == array('test_index' => 'value'));
 }
Example #2
0
 public function testPropertyAssign()
 {
     $t = new \Test\Assign();
     $this->assertTrue($t->testPropertyIncr1() === 2);
     $this->assertTrue($t->testPropertyAddAssign1() === 2);
     $this->assertTrue($t->testPropertyAddAssign2() === 3);
     $this->assertTrue($t->testPropertyAssignValuePlus1() === 2);
     $this->assertTrue($t->testPropertyDecr() === 1);
     $this->assertTrue($t->testPropertySubAssign1() === -2);
     $this->assertTrue($t->testPropertySubAssign2() === -1);
     $this->assertTrue($t->testPropertyMulAssign1() === 2);
     $this->assertTrue($t->testPropertyMulAssign2() === 3);
     $this->assertTrue($t->testPropertyAssignStringConcat() === 'test string');
     $this->assertTrue($t->testArrayVarAssign1('test_index', 'value') == array('test_index' => 'value'));
     $this->assertTrue($t->testArrayVarAssign2('test_index', 'value') == array('test_index' => 'value'));
     $this->assertTrue($t->testPropertyArray14() == $this->getComplexArrayTestValue());
     $this->assertTrue($t->testStaticPropertyArrayMulti4() == $this->getComplexArrayTestValue());
     $this->assertTrue($t->testStaticPropertyArrayAppend() == array("test", 1, 1.5, false, array()));
     $this->assertTrue($t->testArrayBoolExpressionAssign() == array("a" => true, "b" => false));
 }