Skip to content

Commit

Permalink
Merge pull request #876 from jails/refactor/libraries-service-locate
Browse files Browse the repository at this point in the history
Fix a failing test when launched from the framework.
  • Loading branch information
jails committed Apr 5, 2013
2 parents 139dc99 + 1233319 commit 9b19605
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/cases/core/LibrariesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,20 +465,20 @@ public function testServiceLocateApp() {
$body = <<<EOD
<?php
namespace test_app\\controllers;
class HelloWorldController extends \\lithium\\action\\Controller {
class HelloWorldCustomTestController extends \\lithium\\action\\Controller {
public function index() {}
}
?>
EOD;
$filepath = $testApp . '/controllers/HelloWorldController.php';
$filepath = $testApp . '/controllers/HelloWorldCustomTestController.php';
file_put_contents($filepath, $body);
Libraries::cache(false);

$result = Libraries::locate('controllers', 'HelloWorld');
$expected = 'test_app\controllers\HelloWorldController';
$result = Libraries::locate('controllers', 'HelloWorldCustomTest');
$expected = 'test_app\controllers\HelloWorldCustomTestController';
$this->assertEqual($expected, $result);

$result = Libraries::locate('controllers', 'HelloWorld');
$result = Libraries::locate('controllers', 'HelloWorldCustomTest');
$this->assertEqual($expected, $result);
}

Expand Down

0 comments on commit 9b19605

Please sign in to comment.