<?php

//Mock::Generate('Wact_Template_Compiler_Attribute_Expression', 'MockExpressionTemplateAttribute');
Mock::Generate('Wact_Template_Compiler_Attribute', 'MockTemplateAttribute');
Mock::Generate('Wact_Template_Compiler_Node', 'MockTemplateNode');
//Mock::Generate('Wact_Php_Writer', 'MockCodeWriter');
//Mock::Generate('Expression', 'MockExpression');

/*
Mock::generatePartial(
        'Wact_Template_Compiler_Attribute_Expression',
        'ExpressionTemplateAttributePartialMock',
        array('createExpression'));
*/

class Wact_Template_Compiler_Attribute_ExpressionTestCase extends Wact_Test_Case {

/*
    function setUp() {
        $this->expression = new MockExpression($this);

        $this->attribute =new ExpressionTemplateAttributePartialMock($this);
        $this->attribute->setReturnValue('createExpression', $this->expression);
        $this->attribute->expectOnce('createExpression');
        $this->attribute->__construct('test', 'hello', new MockTemplateNode($this), NULL);
    }
*/
/*
    function tearDown() {
        unset ( $this->attribute );
        parent::tearDown();
    }
*/
/*
    function testIsConstant() {
        $this->expression->setReturnValue('IsConstant', TRUE);
        $this->expression->expectOnce('IsConstant');
        $this->assertTrue($this->attribute->isConstant());
    }
*/
/*
    function testGetValue() {
        $this->expression->setReturnValue('getValue', 'hello');
        $this->expression->expectOnce('getValue');
        $this->assertEqual($this->attribute->getValue(), 'hello');
    }
*/
/*
    function testGenerateConstantFragment() {
        $this->expression->setReturnValue('IsConstant', TRUE);
        $this->expression->expectOnce('IsConstant');
        $this->expression->setReturnValue('getValue', 'hello');
        $this->expression->expectOnce('getValue');

        $code = new MockCodeWriter($this);
        $code->expectArguments('writeHTML', array('hello'));
        $this->attribute->generateFragment($code);
    }
*/

/*
    function testGenerateFragment() {
        $this->expression->setReturnValue('IsConstant', FALSE);
        $this->expression->expectOnce('IsConstant');
        $this->expression->setReturnValue('getValue', 'hello');
        $this->expression->expectOnce('generatePreStatement');
        $this->expression->expectOnce('generateExpression');
        $this->expression->expectOnce('generatePostStatement');

        $code = new MockCodeWriter($this);
        $code->expectArgumentsAt(0, 'writePHP', array('echo htmlspecialchars('));
        $code->expectArgumentsAt(1, 'writePHP', array(', ENT_QUOTES);'));
        $this->attribute->generateFragment($code);
    }
*/

/*
    function testGenerate() {
        $this->expression->setReturnValue('IsConstant', FALSE);
        $this->expression->expectOnce('IsConstant');
        $this->expression->setReturnValue('getValue', 'hello');
        $this->expression->expectOnce('generatePreStatement');
        $this->expression->expectOnce('generateExpression');
        $this->expression->expectOnce('generatePostStatement');

        $code = new MockCodeWriter($this);
        $code->expectArgumentsAt(0, 'writeHTML', array(' test'));
        $code->expectArgumentsAt(1, 'writeHTML', array('="'));
        $code->expectArgumentsAt(2, 'writeHTML', array('"'));
        $code->expectArgumentsAt(0, 'writePHP', array('echo htmlspecialchars('));
        $code->expectArgumentsAt(1, 'writePHP', array(', ENT_QUOTES);'));
        $this->attribute->generate($code);
    }
*/

/*
    function testGenerateExpression() {

        $code = new MockCodeWriter($this);
        $code->expectArguments('writePHPLiteral', array('value'));
        $this->attribute->generatePreStatement($code);
        $this->attribute->generateExpression($code);
        $this->attribute->generatePostStatement($code);
    }
*/

}
?>
