コード例 #1
0
ファイル: UnsetTest.php プロジェクト: NumbDai/zephir
 public function testUnsetValueFromProperty()
 {
     $t = new UnsetTestExt();
     $testVar = array(1, 2, 3, 4, 5, 6);
     $this->assertFalse($t->has('testVar'));
     $t->addValueToProperty('testVar', $testVar);
     $this->assertTrue($t->has('testVar'));
     $t->testUnsetValueFromProperty('testVar');
     $this->assertFalse($t->has('testVar'));
     $t->testUnsetProperty();
     $this->assertEquals(null, $t->getProperty());
 }
コード例 #2
0
ファイル: UnsetTest.php プロジェクト: chet0xhenry/zephir
 public function xtestUnsetValueFromProperty()
 {
     //@todo Zephir is not generating the correct code to make this work
     $t = new UnsetTestExt();
     $testVar = array(1, 2, 3, 4, 5, 6);
     $this->assertFalse($t->has('testVar'));
     $t->addValueToProperty('testVar', $testVar);
     $this->assertTrue($t->has('testVar'));
     $t->testUnsetValueFromProperty('testVar');
     $this->assertFalse($t->has('testVar'));
     $t->testUnsetProperty();
     $this->assertEquals(null, $t->getProperty());
 }