1 | <?php |
||
3 | class ErrorTest extends BridgeTestCase |
||
4 | { |
||
5 | public function testErrno() |
||
6 | { |
||
7 | $this->bridge->query('SELECT * FROM test_table'); |
||
8 | $this->assertEquals(0, $this->bridge->errno()); |
||
9 | |||
10 | $this->bridge->query('SELECT * FROM nowhere'); |
||
11 | $this->assertEquals(1146, $this->bridge->errno()); |
||
12 | } |
||
13 | |||
14 | public function testError() |
||
15 | { |
||
16 | $this->bridge->query('SELECT * FROM test_table'); |
||
17 | $this->assertEquals("", $this->bridge->error()); |
||
18 | |||
19 | $this->bridge->query('SELECT * FROM nowhere'); |
||
20 | $this->assertContains("doesn't exist", $this->bridge->error()); |
||
21 | } |
||
22 | } |