Fixed Test bug: PHP Fatal error:  Using $this when not in object context