defineClass() public method

You can pass the class $name and $value to define, or an associative array of classes to define
public defineClass ( string | array $name, mixed $value )
$name string | array String of class $name or associative array to define
$value mixed Value to define class to
    public function testStaticTypeOverwriting()
    {
        $class = 'B' . md5(time());
        $this->sandbox->defineClass('A', $class);
        $this->sandbox->allow_classes = true;
        $this->sandbox->allow_functions = true;
        $this->assertEquals("Yes", $this->sandbox->execute('<?php
                class ' . $class . ' {
                    public $value = "Yes";
                }

                function test' . $class . '(A $var){
                    return $var->value;
                }

                return test' . $class . '(new ' . $class . ');
            ?>'));
    }