/** @test */ public function it_add_an_import_for_a_stylus_animation_in_the_assembler_file() { $report = StyleAssembler::web()->addAnimation('animation-lib'); $this->assertEquals($report, 'SUCCESS'); $fileContent = File::get($this->exampleFile); $contentShouldExist = "@import('effects/animation-lib');"; $this->assertContains($contentShouldExist, $fileContent); }
/** * Configure Style. * * @return void */ protected function setUpStyle() { $this->describeMethod('Setup Stylus'); File::copyDirectory("{$this->packagePath}/stylus/vars", "{$this->stylePath}/basecamp/vars"); $this->reportStep('copy basecamp-design lib-files', 'SUCCESS'); File::copy("{$this->packagePath}/stylus/design.styl", "{$this->stylePath}/basecamp/design.styl"); $this->reportStep('copy design.styl template', 'SUCCESS'); $assemblerFile = $this->stylePath . '/basecamp/design.styl'; $report = FileModifier::open($assemblerFile)->replace("framework : './'", "framework : '../../../../vendor/patrikkernke/basecamp-design/src/stylus/'")->save(); $this->reportStep('change relative path and point to composer package in design.styl', $report); $report = StyleAssembler::web()->addLibrary('basecamp/design'); $this->reportStep("require basecamp/design in web.styl", $report); }