actually use local variable (for Codacy)
This commit is contained in:
parent
d367655c6d
commit
7d1dc55a27
@ -236,16 +236,16 @@ class modelTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($store->exists($ids[$key]), "paste $key exists after storing it");
|
$this->assertTrue($store->exists($ids[$key]), "paste $key exists after storing it");
|
||||||
}
|
}
|
||||||
$this->_model->purge(10);
|
$this->_model->purge(10);
|
||||||
foreach (array_keys($ids) as $key)
|
foreach ($ids as $key => $id)
|
||||||
{
|
{
|
||||||
if (in_array($key, array('x', 'y', 'z')))
|
if (in_array($key, array('x', 'y', 'z')))
|
||||||
{
|
{
|
||||||
$this->assertTrue($this->_model->getPaste($ids[$key])->exists(), "paste $key exists after purge");
|
$this->assertTrue($this->_model->getPaste($id)->exists(), "paste $key exists after purge");
|
||||||
$this->_model->getPaste($ids[$key])->delete();
|
$this->_model->getPaste($id)->delete();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->assertFalse($this->_model->getPaste($ids[$key])->exists(), "paste $key was purged");
|
$this->assertFalse($this->_model->getPaste($id)->exists(), "paste $key was purged");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,11 +89,12 @@ class privatebin_dataTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
if (in_array($key, array('x', 'y', 'z')))
|
if (in_array($key, array('x', 'y', 'z')))
|
||||||
{
|
{
|
||||||
$this->assertTrue($this->_model->exists($ids[$key]), "paste $key exists after purge");
|
$this->assertTrue($this->_model->exists($id), "paste $key exists after purge");
|
||||||
|
$this->_model->delete($id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->assertFalse($this->_model->exists($ids[$key]), "paste $key was purged");
|
$this->assertFalse($this->_model->exists($id), "paste $key was purged");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,12 +95,12 @@ class privatebin_dbTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
if (in_array($key, array('x', 'y', 'z')))
|
if (in_array($key, array('x', 'y', 'z')))
|
||||||
{
|
{
|
||||||
$this->assertTrue($this->_model->exists($ids[$key]), "paste $key exists after purge");
|
$this->assertTrue($this->_model->exists($id), "paste $key exists after purge");
|
||||||
$this->_model->delete($ids[$key]);
|
$this->_model->delete($id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->assertFalse($this->_model->exists($ids[$key]), "paste $key was purged");
|
$this->assertFalse($this->_model->exists($id), "paste $key was purged");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user