Skip to content
This repository has been archived by the owner on Nov 7, 2020. It is now read-only.

Commit

Permalink
test, doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luku authored and markstory committed Mar 29, 2012
1 parent d28e42d commit c818d1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.mdown
Expand Up @@ -14,6 +14,8 @@ The Api Generator provides an easy to use always current documentation generatio

Please See the [installation guide](http://cakephp.lighthouseapp.com/projects/42879/docs-installation).

On Apache servers you may need `AllowEncodedSlashes` directive `On`

## Reporting issues

If you have an issues with Api Generator please open a ticket on lighthouse http://cakephp.lighthouseapp.com/projects/42879-api-generator/overview
Expand Down
4 changes: 2 additions & 2 deletions Test/Case/View/Helper/ApiDocHelperTest.php
Expand Up @@ -120,15 +120,15 @@ function testPackageLink() {

$result = $this->ApiDoc->packageLink('some.package.deep');
$expected = array(
'a' => array('href' => 'http://localhost/api_generator/api_packages/view/deep'),
'a' => array('href' => 'http://localhost/api_generator/api_packages/view/some/package/deep'),
'some.package.deep',
'/a'
);
$this->assertTags($result, $expected);

$result = $this->ApiDoc->packageLink(' some.package.deep');
$expected = array(
'a' => array('href' => 'http://localhost/api_generator/api_packages/view/deep'),
'a' => array('href' => 'http://localhost/api_generator/api_packages/view/some/package/deep'),
' some.package.deep',
'/a'
);
Expand Down
2 changes: 1 addition & 1 deletion View/Helper/ApiDocHelper.php
Expand Up @@ -351,7 +351,7 @@ public function packageLink($package, $url = array(), $attributes = array()) {
*/
public function packageUrl($package, $url = array()) {
if (empty($url)) {
$slug = str_replace('.', '/', $this->slug($package));
$slug = str_replace('.', '/', $this->slug(trim($package)));
$url[] = $slug;
}
$url = array_merge($this->_defaultUrl['package'], $url);
Expand Down

0 comments on commit c818d1f

Please sign in to comment.