<?php
/*
 * Copyright (c) 2012, webvariants GbR, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

class RealURL2_StorageTest extends RealURL2_BaseTest {
	private function getStorage() {
		return new _WV24_Storage(sly_DB_Persistence::getInstance(), sly_Core::cache());
	}

	public function testReadEmptyStorage() {
		$storage = $this->getStorage();

		$this->assertCount(0, $storage->findAll());
		$this->assertCount(0, $storage->findByNamespace('test'));
		$this->assertCount(0, $storage->findByIdent('test', 'test'));
		$this->assertCount(0, $storage->findByUrl('url'));
		$this->assertCount(0, $storage->findByPath('test', '|'));
		$this->assertCount(0, $storage->findByArticle(1, 5));
		$this->assertCount(0, $storage->findByClang(5));
		$this->assertCount(0, $storage->complexFind());
	}
}
