/** * @test */ public function useParsableValue() { $foo = new Stagehand_PHP_Class_Constant('foo', 'Foo::value', true); $this->assertTrue($foo->isParsable()); $this->assertEquals($foo->getValue(), 'Foo::value'); $this->assertEquals($foo->render(), 'const foo = Foo::value;'); $foo->setValue('Foo::value'); $this->assertFalse($foo->isParsable()); $this->assertEquals($foo->getValue(), 'Foo::value'); $this->assertEquals($foo->render(), 'const foo = \'Foo::value\';'); $foo->setValue('Foo::value', true); $this->assertTrue($foo->isParsable()); $this->assertEquals($foo->getValue(), 'Foo::value'); $this->assertEquals($foo->render(), 'const foo = Foo::value;'); }