protected function FeedsHTTPCacheTest::assertCacheItemExists in Feeds 7.2
Asserts that an item with a certain ID exists in the feeds cache table.
Parameters
string $cid: The cache item ID.
5 calls to FeedsHTTPCacheTest::assertCacheItemExists()
- FeedsHTTPCacheTest::testClear in tests/
FeedsHTTPCacheTest.test - @covers FeedsHTTPCache::clear().
- FeedsHTTPCacheTest::testClearExpired in tests/
FeedsHTTPCacheTest.test - @covers FeedsHTTPCache::clear().
- FeedsHTTPCacheTest::testClearExpiredUsingCacheLifeTime in tests/
FeedsHTTPCacheTest.test - @covers FeedsHTTPCache::clear().
- FeedsHTTPCacheTest::testClearMultiple in tests/
FeedsHTTPCacheTest.test - @covers FeedsHTTPCache::clear().
- FeedsHTTPCacheTest::testClearUsingWildcard in tests/
FeedsHTTPCacheTest.test - @covers FeedsHTTPCache::clear().
File
- tests/
FeedsHTTPCacheTest.test, line 128
Class
- FeedsHTTPCacheTest
- @coversDefaultClass FeedsHTTPCache @group feeds
Code
protected function assertCacheItemExists($cid) {
$message = format_string('Cache item @cid exists.', array(
'@cid' => $cid,
));
$count = db_select('cache_feeds_http')
->fields('cache_feeds_http', array(
'cid',
))
->condition('cid', $cid)
->countQuery()
->execute()
->fetchField();
$this
->assertEqual(1, $count, $message);
}