예제 #1
0
	public function testUpdate()
	{
		$tag = Tagging::get('Some Title');
		$tag->body = 'Toreador, a spanjaard heeft een snor';
		$tag->save();
		
		$this->assertEquals(array('Alpha', 'Beta', 'Gamma'), $tag->tags());
		
		$pager = Tagging::search('Toreador', 'en');
		$results = $pager->execute(1, 10);
		$this->assertEquals(1, count($results));
		$this->assertEquals('Some Title', $results[0]->title);
		
		
		$pager = Tagging::search('long', 'en');
		$results = $pager->execute(1, 10);
		$this->assertEquals(0, count($results));
	}