Doctrine\Tests\ODM\CouchDB\View\LuceneResultTest::testArrayAccessForRows PHP Method

testArrayAccessForRows() public method

    public function testArrayAccessForRows()
    {
        $result = new LuceneResult(array("rows" => array(array("id" => "foo", "score" => 1234), array("id" => "foo", "score" => 1234))));
        $this->assertEquals("foo", $result[0]['id']);
        $this->assertEquals("foo", $result[1]['id']);
        $this->assertEquals(1234, $result[0]['score']);
        $this->assertEquals(1234, $result[1]['score']);
    }