/** * @covers Veles\DataBase\Adapters\PdoAdapter::setConnection */ public function testSetConnection() { $expected = 'conn-name'; $actual = $this->object->setConnection($expected); $msg = 'Wrong PdoAdapter::setConnection() behavior'; $this->assertAttributeEquals(null, 'resource', $this->object, $msg); $this->assertAttributeEquals('conn-name', 'connection_name', $this->object, $msg); $msg = 'Wrong PdoAdapter::setConnection() return value'; $this->assertSame($this->object, $actual, $msg); }