lithium\tests\integration\data\DatabaseTest::testManyToOne PHP Method

testManyToOne() public method

public testManyToOne ( )
    public function testManyToOne()
    {
        $opts = array('conditions' => array('gallery_id' => 1));
        $query = new Query($opts + array('type' => 'read', 'model' => 'lithium\\tests\\fixture\\model\\gallery\\Images', 'source' => 'images', 'alias' => 'Images', 'with' => array('Galleries')));
        $images = $this->_db->read($query)->data();
        $expected = (include $this->_export . '/testManyToOne.php');
        $this->assertEqual($expected, $images);
        $images = Images::find('all', $opts + array('with' => 'Galleries'))->data();
        $this->assertEqual($expected, $images);
    }