Sokil\Mongo\StructureTest::testAppend PHP Method

testAppend() public method

public testAppend ( )
    public function testAppend()
    {
        $structure = new Structure();
        $structure->append('key', 'v1');
        $this->assertEquals('v1', $structure->key);
        $structure->append('key', 'v2');
        $this->assertEquals(array('v1', 'v2'), $structure->key);
        $structure->set('key', 'v1');
        $this->assertEquals('v1', $structure->key);
        $structure->append('key', 'v2');
        $this->assertEquals(array('v1', 'v2'), $structure->key);
    }