Source

						public function testLocateWithTestAppLibrary() {
		$testApp = Libraries::get(true, 'resources') . '/tmp/tests/test_app';
		mkdir($testApp);
		Libraries::add('test_app', array('path' => $testApp));

		mkdir($testApp . '/tests/cases/models', 0777, true);
		file_put_contents($testApp . '/tests/cases/models/UserTest.php',
		"<?php namespace test_app\\tests\\cases\\models;\n
			class UserTest extends \\lithium\\test\\Unit { public function testMe() {
				\$this->assertTrue(true);
			}}"
		);
		Libraries::cache(false);

		$expected = array('test_app\\tests\\cases\\models\\UserTest');
	    $result = (array) Libraries::locate("tests", null, array('library' => 'test_app'));
	    $this->assertEqual($expected, $result);

		$this->_cleanUp();
	}