lithium\tests\cases\g11n\catalog\AdapterTest::testMergeFlags PHP Method

testMergeFlags() public method

public testMergeFlags ( )
    public function testMergeFlags()
    {
        $item = array('id' => 'test', 'flags' => array('fuzzy' => true));
        $data = $this->adapter->merge(array(), $item);
        $item = array('id' => 'test', 'flags' => array('fuzzy' => false));
        $expected = array('test' => array('id' => 'test', 'ids' => array(), 'translated' => null, 'flags' => array('fuzzy' => false), 'comments' => array(), 'occurrences' => array()));
        $result = $this->adapter->merge($data, $item);
        $this->assertEqual($expected, $result);
        $item = array('id' => 'test', 'flags' => array('fuzzy' => false));
        $data = $this->adapter->merge(array(), $item);
        $item = array('id' => 'test', 'flags' => array('fuzzy' => true));
        $expected = array('test' => array('id' => 'test', 'ids' => array(), 'translated' => null, 'flags' => array('fuzzy' => true), 'comments' => array(), 'occurrences' => array()));
        $result = $this->adapter->merge($data, $item);
        $this->assertEqual($expected, $result);
    }