Ejemplo n.º 1
0
    /**
     * @covers Geissler\CSL\Rendering\Label::__construct
     * @covers Geissler\CSL\Rendering\Label::setVariable
     * @covers Geissler\CSL\Rendering\Label::render
     * @covers Geissler\CSL\Rendering\Label::hasAccessEmptyVariable
     */
    public function testRenderNot1()
    {
        $layout = '<label plural="contextual" strip-periods="true" />';
        $json = '[
    {
        "editor": [
            {
                "family": "Doe",
                "given": "John",
                "static-ordering": false
            }
        ],
        "id": "ITEM-1",
        "type": "book"
    }
]';
        $this->initElement($layout, $json);
        $this->assertInstanceOf($this->class, $this->object->setVariable('author'));
        $this->assertEquals('', $this->object->render(''));
        $this->assertTrue($this->object->hasAccessEmptyVariable());
    }