bookmarks /app/tests/cases/models/link.test.php

Language PHP Lines 34
MD5 Hash b453a544fcca4ca972178fbe28a3cf1c
Repository https://github.com/hardsshah/bookmarks.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php 
/* SVN FILE: $Id$ */
/* Link Test cases generated on: 2009-03-08 21:03:21 : 1236562161*/
App::import('Model', 'Link');

class LinkTestCase extends CakeTestCase {
	var $Link = null;
	var $fixtures = array('app.link');

	function startTest() {
		$this->Link =& ClassRegistry::init('Link');
	}

	function testLinkInstance() {
		$this->assertTrue(is_a($this->Link, 'Link'));
	}

	function testLinkFind() {
		$this->Link->recursive = -1;
		$results = $this->Link->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Link' => array(
			'id'  => 1,
			'link_category_id'  => 1,
			'name'  => 'Lorem ipsum dolor sit amet',
			'url'  => 'Lorem ipsum dolor sit amet',
			'created'  => '2009-03-08 21:29:21',
			'modified'  => '2009-03-08 21:29:21'
			));
		$this->assertEqual($results, $expected);
	}
}
?>
Back to Top