Skip to content

Commit

Permalink
bug fix in src/Engineer/Build/Test.php
Browse files Browse the repository at this point in the history
  • Loading branch information
amirfaramarzi committed Aug 22, 2021
1 parent 58e9d45 commit 252c69d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Engineer/Build/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protected function sample(array $arguments , string $namespace): void
return;
}

$code = "<?php \n\nnamespace Tests\Units;\n\nuse Tests\TestCase;\n\nclass $namespace extends TestCase\n{\n\tpublic function testTrueAssertsToTrue()\n\t{\n\t\t"."\$"."this".'->assertTrue(true)'.";\n\t}\n}";
$code = "<?php \n\nnamespace Tests\Units;\n\nuse Tests\TestCase;\n\nclass $namespace extends TestCase\n{\n\tpublic function testExample()\n\t{\n\t\t"."\$"."this".'->assertTrue(true)'.";\n\t}\n}";
$build = fopen(basePath() . "/tests/Units/$arguments[2].php", 'a');

fwrite($build , $code);
Expand All @@ -40,7 +40,7 @@ protected function advanced(array $arguments , array $namespace): void
if (! is_dir(basePath() . "/tests/Units/$directory"))
mkdir(basePath() . "/tests/Units/$directory/" , 0777, true);

$code = "<?php \n\nnamespace Tests\Units\\$namespace;\n\nuse Tests\TestCase;\n\nclass $className extends TestCase\n{\n\tpublic function testTrueAssertsToTrue()\n\t{\n\t\t"."\$"."this".'->assertTrue(true)'.";\n\t}\n}";
$code = "<?php \n\nnamespace Tests\Units\\$namespace;\n\nuse Tests\TestCase;\n\nclass $className extends TestCase\n{\n\tpublic function testExample()\n\t{\n\t\t"."\$"."this".'->assertTrue(true)'.";\n\t}\n}";

$build = fopen(basePath() . "/tests/Units/$arguments[2].php", 'a');
fwrite($build , $code);
Expand Down

0 comments on commit 252c69d

Please sign in to comment.