public function testSettingAuthentication() { $adapter = $this->getMock('Doctrine\\OrientDB\\Binding\\Adapter\\HttpClientAdapterInterface'); $adapter->expects($this->at(1))->method('setAuthentication')->with(null, null); $adapter->expects($this->at(2))->method('setAuthentication')->with(TEST_ODB_USER, TEST_ODB_PASSWORD); $parameters = new BindingParameters(); $binding = new HttpBinding($parameters, $adapter); $binding->setAuthentication(); $binding->setAuthentication(TEST_ODB_USER, TEST_ODB_PASSWORD); }