Skip to content

Commit

Permalink
Mark test as incomplete
Browse files Browse the repository at this point in the history
- Because PDO_SQLite does not return a row count, it means that
  count($resultSet) always returns 0, which means hasSubscriptions() always
  returns false, regardless of whether or not there are items in the resultset.
  Behavior will be added to the drivers at a later date to correct this
  situation.
  • Loading branch information
weierophinney committed Mar 5, 2012
1 parent 2c6b7bc commit b91ab1c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/Zend/Feed/PubSubHubbub/Model/SubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
*/
public function testAllOperations()
{
$adapter = $this->_initDb();
$this->markTestIncomplete('PDO_Sqlite does not return row count, and no solution in Zend\Db yet for this');

$adapter = $this->initDb();
$table = new TableGateway('subscription', $adapter);

$subscription = new Subscription($table);
Expand Down Expand Up @@ -71,20 +73,20 @@ public function testImpemetsSubscriptionInterface()
unset($reflection);
}

protected function _initDb()
protected function initDb()
{
if (!extension_loaded('pdo')
|| !in_array('sqlite', \PDO::getAvailableDrivers())
) {
$this->markTestSkipped('Test only with pdo_sqlite');
}
$db = new DbAdapter(array('driver' => 'pdo_sqlite', 'dsn' => 'sqlite::memory:'));
$this->_createTable($db);
$this->createTable($db);

return $db;
}

protected function _createTable($db)
protected function createTable($db)
{
$sql = "CREATE TABLE subscription ("
. "id varchar(32) PRIMARY KEY NOT NULL DEFAULT '', "
Expand Down

0 comments on commit b91ab1c

Please sign in to comment.