Exemple #1
0
 /**
  *  @dependsOn testRebuildRebuild
  */
 public function testProductionModeDontBuild()
 {
     $GLOBALS['phpunit'] = $this;
     $GLOBALS['builded'] = false;
     $this->touch(__DIR__ . '/tasks/one.php');
     crodas\Build::productionMode();
     $bar = [new Stdclass()];
     $build = new crodas\Build(__DIR__);
     $file = $build->build1([__FILE__, __DIR__], $bar);
     $this->assertTrue(is_file($file));
     $this->assertFalse($GLOBALS['builded']);
     unlink($file);
     $this->assertFalse(is_file($file));
     $build = new crodas\Build(__DIR__);
     $bar = [new Stdclass()];
     $file2 = $build->build1([__FILE__, __DIR__], $bar);
     $this->assertTrue(is_file($file2));
     $this->assertEquals($file, $file2);
     $this->assertTrue($GLOBALS['builded']);
 }
Exemple #2
0
<?php

require __DIR__ . "/../vendor/autoload.php";
$b = new crodas\Build([__DIR__]);
$c = $b->build1(__FILE__);
var_dump($c);