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

Commit

Permalink
[TESTS] Fix Session\SaveHandler\DbTableTest
Browse files Browse the repository at this point in the history
- Fixed flawed expected exception names/strings
- Replaced deprecated assertions with new PHPUnit 3.5 versions
  • Loading branch information
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/SaveHandler/DbTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function setUp()
$this->markTestSkipped('Zend\Session\SaveHandler\DbTable tests are not enabled due to missing PDO_Sqlite extension');
}

$this->markTestSkipped('Skipped until Zend\Db is refactored, this tests assumptions are generally bad, more assertions are needed');
// $this->markTestSkipped('Skipped until Zend\Db is refactored, this tests assumptions are generally bad, more assertions are needed');

$this->manager = $manager = new TestManager();
$this->_saveHandlerTableConfig['manager'] = $this->manager;
Expand All @@ -109,8 +109,8 @@ public function tearDown()
public function testConfigPrimaryAssignmentFullConfig()
{
$sh = new DbTable($this->_saveHandlerTableConfig);
$this->assertType('Zend\Db\Table\AbstractTable', $sh);
$this->assertType('Zend\Session\Manager', $sh->getManager());
$this->assertInstanceOf('Zend\Db\Table\AbstractTable', $sh);
$this->assertInstanceOf('Zend\Session\Manager', $sh->getManager());
}

public function testConstructorThrowsExceptionGivenConfigAsNull()
Expand All @@ -137,8 +137,8 @@ public function testTableEmptyNamePullFromSavePath()
$this->manager->getConfig()->setSavePath(__DIR__);

$this->setExpectedException(
'Zend\Session\SaveHandler\Exception\InvalidArgumentException',
'xxx'
'Zend\Session\SaveHandler\Exception',
'path'
);
$this->_usedSaveHandlers[] = $saveHandler = new DbTable($config);
}
Expand Down Expand Up @@ -217,9 +217,8 @@ public function testDifferentArraySize()
array_pop($config[DbTable::PRIMARY_ASSIGNMENT]);

$this->setExpectedException(
'Zend\Session\SaveHandler\Exception\RuntimeException',
'Configuration must define \'dataColumn\' which names the session table data column'
);
'Zend\Session\SaveHandler\Exception\RuntimeException'
);
$this->_usedSaveHandlers[] = $saveHandler = new DbTable($config);
}

Expand Down

0 comments on commit 75ad66a

Please sign in to comment.