Пример #1
0
    /** @test */
    public function itShouldHaveAnInitialValueAndType()
    {
        $prop = new Property('foo');
        $expected = <<<PHP
    /** @var string */
    private \$foo = 'foo';
PHP;
        $prop->setValue("'foo'");
        $prop->setType(Property::T_STRING);
        $prop->setVisibility(Property::IS_PRIVATE);
        $this->assertSame($expected, (string) $prop);
    }