lithium\tests\cases\core\LibrariesTest::testLocateWithTestAppLibrary PHP Method

testLocateWithTestAppLibrary() public method

    public function testLocateWithTestAppLibrary()
    {
        $testApp = Libraries::get(true, 'resources') . '/tmp/tests/test_app';
        mkdir($testApp, 0777, true);
        Libraries::add('test_app', array('path' => $testApp));
        mkdir($testApp . '/tests/cases/models', 0777, true);
        $body = <<<EOD
<?php
namespace test_app\\tests\\cases\\models;
class UserTest extends \\lithium\\test\\Unit {
\tpublic function testMe() {
\t\t\$this->assertTrue(true);
\t}
}
?>
EOD;
        $filepath = $testApp . '/tests/cases/models/UserTest.php';
        file_put_contents($filepath, $body);
        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);
    }