Source

						public function testReadWithRelationship() {
		$options = array(
			'type' => 'read',
			'model' => $this->_model,
			'with' => array('MockDatabaseComment')
		);
		$result = $this->db->read(new Query($options), $options);
		$expected = 'SELECT * FROM {mock_database_posts} AS {MockDatabasePost} LEFT JOIN ' .
					'{mock_database_comments} AS {MockDatabaseComment} ON ' .
					'{MockDatabasePost}.{id} = {MockDatabaseComment}.{mock_database_post_id};';
		$this->assertEqual($expected, $this->db->sql);
	}