Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 18b2456

Browse files
committed
remove @deprecated class and method
update DbTable\CredentialTreatmentAdapter usage in DbTable\CredentialTreatmentAdapterTest
1 parent c8aa330 commit 18b2456

6 files changed

+11
-69
lines changed

src/Adapter/DbTable.php

-17
This file was deleted.

src/Adapter/Http.php

-17
Original file line numberDiff line numberDiff line change
@@ -371,23 +371,6 @@ public function authenticate()
371371
return $result;
372372
}
373373

374-
/**
375-
* @deprecated
376-
* @see Http::challengeClient()
377-
* @return Authentication\Result Always returns a non-identity Auth result
378-
*/
379-
protected function _challengeClient()
380-
{
381-
trigger_error(sprintf(
382-
'The method "%s" is deprecated and will be removed in the future; '
383-
. 'please use the public method "%s::challengeClient()" instead',
384-
__METHOD__,
385-
__CLASS__
386-
), E_USER_DEPRECATED);
387-
388-
return $this->challengeClient();
389-
}
390-
391374
/**
392375
* Challenge Client
393376
*

test/Adapter/DbTable/CallbackCheckAdapterTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function testCatchExceptionNoTable()
225225
{
226226
$this->setExpectedException('Zend\Authentication\Adapter\Dbtable\Exception\RuntimeException',
227227
'A table must be supplied for');
228-
$adapter = new Adapter\DbTable($this->_db);
228+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db);
229229
$adapter->authenticate();
230230
}
231231

@@ -236,7 +236,7 @@ public function testCatchExceptionNoIdentityColumn()
236236
{
237237
$this->setExpectedException('Zend\Authentication\Adapter\Dbtable\Exception\RuntimeException',
238238
'An identity column must be supplied for the');
239-
$adapter = new Adapter\DbTable($this->_db, 'users');
239+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db, 'users');
240240
$adapter->authenticate();
241241
}
242242

@@ -247,7 +247,7 @@ public function testCatchExceptionNoCredentialColumn()
247247
{
248248
$this->setExpectedException('Zend\Authentication\Adapter\Dbtable\Exception\RuntimeException',
249249
'A credential column must be supplied');
250-
$adapter = new Adapter\DbTable($this->_db, 'users', 'username');
250+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db, 'users', 'username');
251251
$adapter->authenticate();
252252
}
253253

test/Adapter/DbTable/CredentialTreatmentAdapterDb2Test.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function testAuthenticateSuccess()
109109
*/
110110
public function testAuthenticateSuccessWithTreatment()
111111
{
112-
$this->authAdapter = new Adapter\DbTable($this->db, $this->tableName, 'username', 'password', '?');
112+
$this->authAdapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->db, $this->tableName, 'username', 'password', '?');
113113
$this->authAdapter->setIdentity('my_username');
114114
$this->authAdapter->setCredential('my_password');
115115
$result = $this->authAdapter->authenticate();
@@ -249,7 +249,7 @@ public function testAdapterReturnsASelectObjectWithoutAuthTimeModificationsAfter
249249
public function testCatchExceptionNoTable()
250250
{
251251
$this->setExpectedException('Zend\Authentication\Adapter\DbTable\Exception\RuntimeException', 'A table must be supplied for');
252-
$adapter = new Adapter\DbTable($this->db);
252+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->db);
253253
$adapter->authenticate();
254254
}
255255

@@ -262,7 +262,7 @@ public function testCatchExceptionNoIdentityColumn()
262262
'Zend\Authentication\Adapter\DbTable\Exception\RuntimeException',
263263
'An identity column must be supplied for the'
264264
);
265-
$adapter = new Adapter\DbTable($this->db, 'users');
265+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->db, 'users');
266266
$adapter->authenticate();
267267
}
268268

@@ -275,7 +275,7 @@ public function testCatchExceptionNoCredentialColumn()
275275
'Zend\Authentication\Adapter\DbTable\Exception\RuntimeException',
276276
'A credential column must be supplied'
277277
);
278-
$adapter = new Adapter\DbTable($this->db, 'users', 'username');
278+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->db, 'users', 'username');
279279
$adapter->authenticate();
280280
}
281281

test/Adapter/DbTable/CredentialTreatmentAdapterTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testAuthenticateSuccess()
7878
*/
7979
public function testAuthenticateSuccessWithTreatment()
8080
{
81-
$this->_adapter = new Adapter\DbTable($this->_db, 'users', 'username', 'password', '?');
81+
$this->_adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db, 'users', 'username', 'password', '?');
8282
$this->_adapter->setIdentity('my_username');
8383
$this->_adapter->setCredential('my_password');
8484
$result = $this->_adapter->authenticate();
@@ -212,7 +212,7 @@ public function testCatchExceptionNoTable()
212212
{
213213
$this->setExpectedException('Zend\Authentication\Adapter\DbTable\Exception\RuntimeException',
214214
'A table must be supplied for');
215-
$adapter = new Adapter\DbTable($this->_db);
215+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db);
216216
$adapter->authenticate();
217217
}
218218

@@ -223,7 +223,7 @@ public function testCatchExceptionNoIdentityColumn()
223223
{
224224
$this->setExpectedException('Zend\Authentication\Adapter\DbTable\Exception\RuntimeException',
225225
'An identity column must be supplied for the');
226-
$adapter = new Adapter\DbTable($this->_db, 'users');
226+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db, 'users');
227227
$adapter->authenticate();
228228
}
229229

@@ -234,7 +234,7 @@ public function testCatchExceptionNoCredentialColumn()
234234
{
235235
$this->setExpectedException('Zend\Authentication\Adapter\DbTable\Exception\RuntimeException',
236236
'A credential column must be supplied');
237-
$adapter = new Adapter\DbTable($this->_db, 'users', 'username');
237+
$adapter = new Adapter\DbTable\CredentialTreatmentAdapter($this->_db, 'users', 'username');
238238
$adapter->authenticate();
239239
}
240240

test/Adapter/DbTableTest.php

-24
This file was deleted.

0 commit comments

Comments
 (0)