<?php
namespace nulib\cache;

use nulib\db\Capacitor;
use nulib\db\CapacitorStorage;
use nulib\db\sqlite\Sqlite;
use nulib\db\sqlite\SqliteStorage;
use nulib\tests\TestCase;

class SourceTest extends TestCase {
  function test() {
    $destStorage = new SqliteStorage(new Sqlite(__DIR__.'/dest.db'));
    new Capacitor($destStorage, $channel = new CursorChannel("source"));

    $sourceDb = new SourceDb();
    $channel->rechargeAll($sourceDb->all("select * from source"));

    self::assertTrue(true);
  }
}
