Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
XML_Query2XML::stopProfiling()
3
--SKIPIF--
4
<?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?>
5
--FILE--
6
<?php
7
    require_once 'XML/Query2XML.php';
8
    require_once dirname(dirname(__FILE__)) . '/db_init.php';
9
    $query2xml =& XML_Query2XML::factory($db);
10
    $query2xml->startProfiling();
11
    $query2xml->stopProfiling();
12
    $dom =& $query2xml->getXML(
13
        "SELECT
14
            *
15
         FROM
16
            artist
17
         ORDER BY
18
            artistid",
19
        array(
20
            'rootTag' => 'music_library',
21
            'rowTag' => 'artist',
22
            'idColumn' => 'artistid',
23
            'elements' => array(
24
                'artistid',
25
                'name',
26
                'birth_year',
27
                'birth_place',
28
                'genre',
29
                'albums' => array(
30
                    'sql' => array(
31
                        'data' => array(
32
                            'artistid'
33
                        ),
34
                        'query' => 'SELECT * FROM album WHERE artist_id = ? ORDER BY albumid'
35
                    ),
36
                    'rootTag' => 'albums',
37
                    'rowTag' => 'album',
38
                    'idColumn' => 'albumid',
39
                    'elements' => array(
40
                        'albumid',
41
                        'title',
42
                        'published_year',
43
                        'comment'
44
                    )
45
                )
46
            )
47
        )
48
    );
49
    $profile = $query2xml->getRawProfile();
50
    print count($profile['queries'])
51
?>
52
--EXPECT--
53