Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
webbingbrasil/themes-module / Tests / Console / PublishAssetsCommandTest.php
Size: Mime:
<?php
namespace Tests\Console;

use Illuminate\Support\Facades\File;
use Tests\TestCase;
use Themes;

class PublishAssetsCommandTest extends TestCase
{
    public function testAssetPublishing()
    {
        $this->app['files']->cleanDirectory(public_path());
        $this->app['themes']->registerPaths(Themes::discover(__DIR__ . '/../Stubs/Themes'));

        $artisan = $this->app->make('Illuminate\Contracts\Console\Kernel');

        File::shouldReceive('exists')->andReturn(true)->times(8);
        File::shouldReceive('get')->times(6);
        File::shouldReceive('copyDirectory')->times(3);

        // Action
        $artisan->call('theme:publish');

        // Assert
//        $this->assertTrue($this->app['files']->exists(public_path('themes/child-theme')));
//        $this->assertFalse($this->app['files']->exists(public_path('themes/parent-theme')));
    }
}