Exemplo n.º 1
0
    /**
     * Tests that the isChecked method works as expected when using a translator.
     * @group ZF-4073
     */
    public function testIsCheckedReturnsExpectedValueWhenUsingTranslator()
    {
        $translations = array('label' => 'translation');
        $translate = new Translator('ArrayAdapter', $translations);

        $submit = new SubmitElement('foo', 'label');
        $submit->setTranslator($translate);
        $submit->setValue($translations['label']);
        
        $this->assertTrue($submit->isChecked());

        $submit->setValue('label');
        $this->assertFalse($submit->isChecked());
    }