public function testAddTestAppGroup()
{
$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);
file_put_contents($testApp . '/tests/cases/models/UserTest.php', "<?php namespace test_app\\tests\\cases\\models;\n\n\t\t\tclass UserTest extends \\lithium\\test\\Unit { public function testMe() {\n\t\t\t\t\$this->assertTrue(true);\n\t\t\t}}");
Libraries::cache(false);
$expected = (array) Libraries::find('test_app', array('recursive' => true, 'path' => '/tests', 'filter' => '/cases|integration|functional/'));
Libraries::cache(false);
$group = new Group();
$result = $group->add('test_app');
$this->assertEqual($expected, $result);
Libraries::cache(false);
$this->_cleanUp();
}