This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a test case for the read & destroy recursion
- Loading branch information
1 parent
9e61ac6
commit 1eecfdc
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace ZendTest\Session\TestAsset; | ||
|
||
use Zend\Session\SaveHandler\DbTableGateway; | ||
|
||
class TestDbTableGatewaySaveHandler extends DbTableGateway | ||
{ | ||
protected $numReadCalls = 0; | ||
|
||
protected $numDestroyCalls = 0; | ||
|
||
public function getNumReadCalls() | ||
{ | ||
return $this->numReadCalls; | ||
} | ||
|
||
public function getNumDestroyCalls() | ||
{ | ||
return $this->numDestroyCalls; | ||
} | ||
|
||
public function read($id, $destroyExpired = true) | ||
{ | ||
$this->numReadCalls++; | ||
return parent::read($id, $destroyExpired); | ||
} | ||
|
||
public function destroy($id) | ||
{ | ||
$this->numDestroyCalls++; | ||
return parent::destroy($id); | ||
} | ||
} |