Example #1
0
 public function testAssign()
 {
     $t = new \Test\Assign();
     $this->assertTrue($t->testAssign1() === 1);
     $this->assertTrue($t->testAssign2() === 1);
     $this->assertTrue($t->testAssign3() === 0);
     $this->assertTrue($t->testAssign4() === 0);
     $this->assertTrue($t->testAssign5() === 2);
     $this->assertTrue($t->testAssign6() === true);
     $this->assertTrue($t->testAssign7() === true);
     $this->assertTrue($t->testAssign8() === true);
     $this->assertTrue($t->testAssign9() === false);
     $this->assertTrue($t->testAssign10() === false);
     $this->assertTrue($t->testAssign11() === 0.0);
     $this->assertTrue($t->testAssign12() === 4.0);
     $this->assertTrue($t->testAssign13() === 0.0);
     $this->assertTrue($t->testAssign14() === 1.0);
     $this->assertTrue($t->testAssign15() === 5.0);
     $this->assertTrue($t->testAssign16() === 1);
     $this->assertTrue($t->testAssign17() === 1.0);
     $this->assertTrue($t->testAssign18() === false);
     $this->assertTrue($t->testAssign19() === true);
     $this->assertTrue($t->testAssign20() === null);
     $this->assertTrue($t->testAssign21() === 1);
     $this->assertTrue($t->testAssign22() === 1.0);
     $this->assertTrue($t->testAssign23() === true);
     $this->assertTrue($t->testAssign24() === 1.0);
     $this->assertTrue($t->testAssign25() === 1.0);
     $this->assertTrue($t->testAssign26() === 1);
     $this->assertTrue($t->testAssign27() === 1.0);
     $this->assertTrue($t->testAssign28() === true);
     $this->assertTrue($t->testAssign29() === true);
     $this->assertTrue($t->testAssign30() === 0);
     $this->assertTrue($t->testAssign31() === 0.0);
     $this->assertTrue($t->testAssign32() === false);
     $this->assertTrue($t->testAssign33() === false);
     $this->assertTrue($t->testAssign34() === false);
     $this->assertTrue($t->testAssign35() === false);
     $this->assertTrue($t->testAssign36() === false);
     $this->assertTrue($t->testAssign37() == $this->getComplexArrayTestValue());
     $this->assertTrue($t->testAssign38('i') == array('i' => 'val'));
 }
Example #2
0
 public function testAssign()
 {
     $t = new \Test\Assign();
     $this->assertSame($t->testAssign1(), 1);
     $this->assertSame($t->testAssign2(), 1);
     $this->assertSame($t->testAssign3(), 0);
     $this->assertSame($t->testAssign4(), 0);
     $this->assertSame($t->testAssign5(), 2);
     $this->assertTrue($t->testAssign6());
     $this->assertTrue($t->testAssign7());
     $this->assertTrue($t->testAssign8());
     $this->assertFalse($t->testAssign9());
     $this->assertFalse($t->testAssign10());
     $this->assertSame($t->testAssign11(), 0.0);
     $this->assertSame($t->testAssign12(), 4.0);
     $this->assertSame($t->testAssign13(), 0.0);
     $this->assertSame($t->testAssign14(), 1.0);
     $this->assertSame($t->testAssign15(), 5.0);
     $this->assertSame($t->testAssign16(), 1);
     $this->assertSame($t->testAssign17(), 1.0);
     $this->assertFalse($t->testAssign18());
     $this->assertTrue($t->testAssign19());
     $this->assertNull($t->testAssign20());
     $this->assertSame($t->testAssign21(), 1);
     $this->assertSame($t->testAssign22(), 1.0);
     $this->assertTrue($t->testAssign23());
     $this->assertSame($t->testAssign24(), 1.0);
     $this->assertSame($t->testAssign25(), 1.0);
     $this->assertSame($t->testAssign26(), 1);
     $this->assertSame($t->testAssign27(), 1.0);
     $this->assertTrue($t->testAssign28());
     $this->assertTrue($t->testAssign29());
     $this->assertSame($t->testAssign30(), 0);
     $this->assertSame($t->testAssign31(), 0.0);
     $this->assertFalse($t->testAssign32());
     $this->assertFalse($t->testAssign33());
     $this->assertFalse($t->testAssign34());
     $this->assertFalse($t->testAssign35());
     $this->assertFalse($t->testAssign36());
     $this->assertSame($t->testAssign37(), $this->getComplexArrayTestValue1());
     $this->assertSame($t->testAssign38('i'), array('i' => 'val'));
 }