@@ 57-63 (lines=7) @@ | ||
54 | /** |
|
55 | * @expectedException \Port\Exception\WriterException |
|
56 | */ |
|
57 | public function testWriteTooManyValues() |
|
58 | { |
|
59 | $writer = new PdoWriter($this->pdo, 'example'); |
|
60 | $writer->prepare(); |
|
61 | $writer->writeItem(array('foo', 'bar', 'baz')); //expects two |
|
62 | $writer->finish(); |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @expectedException \Port\Exception\WriterException |
|
@@ 68-74 (lines=7) @@ | ||
65 | /** |
|
66 | * @expectedException \Port\Exception\WriterException |
|
67 | */ |
|
68 | public function testWriteToNonexistentTable() |
|
69 | { |
|
70 | $writer = new PdoWriter($this->pdo, 'foobar'); |
|
71 | $writer->prepare(); |
|
72 | $writer->writeItem(array('foo', 'bar')); |
|
73 | $writer->finish(); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * Tests PDO instance with silent errors. |