/** * @test */ public function accessPropertyAndUpdate() { $className = 'ExampleForPropertyUpdate'; $class = new Stagehand_PHP_Class($className); $property1 = new Stagehand_PHP_Class_Property('a', 100); $class->addProperty($property1); $this->assertSame($class->getProperty('a'), $property1); $property2 = new Stagehand_PHP_Class_Property('a', 200); $class->setProperty($property2); $this->assertSame($class->getProperty('a'), $property2); $class->load(); $instance = new $className(); $this->assertEquals($instance->a, 200); }