Commit 57925465 by Taylor Otwell

added tests_path constant and added tests to bundle publisher.

parent ba1d2a62
......@@ -14,20 +14,23 @@ class Publisher {
*/
public function publish($bundle)
{
$this->move($bundle, $this->from($bundle), $this->to($bundle));
$path = Bundle::path($bundle);
echo "Assets published for bundle [$bundle].".PHP_EOL;
$this->move($path.'public', PUBLIC_PATH.'bundles'.DS.$bundle);
$this->move($path.'tests', TESTS_PATH.'cases'.DS.'bundles'.DS.$bundle);
echo "Assets and tests published for bundle [$bundle].".PHP_EOL;
}
/**
* Copy the contents of a bundle's assets to the public folder.
*
* @param string $bundle
* @param string $source
* @param string $destination
* @return void
*/
protected function move($bundle, $source, $destination)
protected function move($source, $destination)
{
File::copy_dir($source, $destination);
}
......
......@@ -24,6 +24,11 @@ define('DS', DIRECTORY_SEPARATOR);
$paths['APP_PATH'] = 'application';
// --------------------------------------------------------------
// The path to the Laravel directory.
// --------------------------------------------------------------
$paths['SYS_PATH'] = 'laravel';
// --------------------------------------------------------------
// The path to the bundles directory.
// --------------------------------------------------------------
$paths['BUNDLE_PATH'] = 'bundles';
......@@ -34,9 +39,9 @@ $paths['BUNDLE_PATH'] = 'bundles';
$paths['STORAGE_PATH'] = 'storage';
// --------------------------------------------------------------
// The path to the Laravel directory.
// The path to the tests directory.
// --------------------------------------------------------------
$paths['SYS_PATH'] = 'laravel';
$paths['TESTS_PATH'] = 'tests';
// --------------------------------------------------------------
// The path to the public directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment