Index: trunk/phase3/tests/DatabaseTest.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | |
11 | 11 | function testAddQuotesNull() { |
12 | 12 | $check = "NULL"; |
13 | | - if ( $this->db instanceOf DatabaseSqlite ) { |
| 13 | + if ( $this->db->getType() === 'sqlite' ) { |
14 | 14 | $check = "''"; |
15 | 15 | } |
16 | 16 | $this->assertEquals( $check, $this->db->addQuotes( null ) ); |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | |
40 | 40 | function testAddQuotesStringQuote() { |
41 | 41 | $check = "'string''s cause trouble'"; |
42 | | - if ( $this->db instanceOf DatabaseMysql ) { |
| 42 | + if ( $this->db->getType() === 'mysql' ) { |
43 | 43 | $check = "'string\'s cause trouble'"; |
44 | 44 | } |
45 | 45 | $this->assertEquals( |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | array( 4, "Snicker's_paradox" ) ); |
62 | 62 | |
63 | 63 | $check = "SELECT * FROM cur WHERE cur_namespace='4' AND cur_title='Snicker''s_paradox'"; |
64 | | - if ( $this->db instanceOf DatabaseMysql ) { |
| 64 | + if ( $this->db->getType() === 'mysql' ) { |
65 | 65 | $check = "SELECT * FROM cur WHERE cur_namespace='4' AND cur_title='Snicker\'s_paradox'"; |
66 | 66 | } |
67 | 67 | $this->assertEquals( $check, $sql ); |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( '"user"', "Slash's Dot" ) ); |
74 | 74 | |
75 | 75 | $check = "SELECT user_id FROM \"user\" WHERE user_name='Slash''s Dot'"; |
76 | | - if ( $this->db instanceOf DatabaseMysql ) { |
| 76 | + if ( $this->db->getType() === 'mysql' ) { |
77 | 77 | $check = "SELECT user_id FROM \"user\" WHERE user_name='Slash\'s Dot'"; |
78 | 78 | } |
79 | 79 | $this->assertEquals( $check, $sql ); |