Example #1
0
 public function testSetDefaultAttributes()
 {
     $this->_callbackSetAttribute = array(array('key' => \PDO::ATTR_CASE, 'value' => \PDO::CASE_NATURAL), array('key' => \PDO::ATTR_ERRMODE, 'value' => \PDO::ERRMODE_EXCEPTION), array('key' => \PDO::ATTR_ORACLE_NULLS, 'value' => \PDO::NULL_TO_STRING));
     $this->_mockPdo->expects($this->exactly(count($this->_callbackSetAttribute)))->method('setAttribute')->will($this->returnCallback(array($this, 'callbackSetAttribute')));
     $this->_mockPdo->expects($this->exactly(1))->method('query')->with($this->equalTo('SET NAMES utf8'));
     $actual = $this->_candidate->setDefaultAttributes();
     $this->assertNull($actual);
 }