public function testStringMethodCall() { $model = new TestModel(); $model->jsonProperty = 'foo'; $model->foo = ''; $this->assertInstanceOf(JsonProperty::class, $model->foo()); $this->assertInstanceOf(JsonProperty::class, $model->foo()); $this->assertNull($model->undefinedProperty()); }