Skip to content

Commit

Permalink
Convert indentation to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Nwaokoro committed May 24, 2024
1 parent 9c81484 commit 2506759
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions tests/cases/GenerateLangExclusionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ class GenerateLangExclusionsTest extends WpmvcAyucoTestCase
/**
* Temporary hold for bootstrap config.
*/
protected $configBackup;
/**
protected $configBackup;
/**
* paths to be unlinked during Teardown.
*/
protected $path = [
FRAMEWORK_PATH.'/environment/assets/lang/',
FRAMEWORK_PATH.'/environment/assets/views/',
FRAMEWORK_PATH.'/environment/assets/js/',
FRAMEWORK_PATH.'/environment/assets/',
];
protected $path = [
FRAMEWORK_PATH.'/environment/assets/lang/',
FRAMEWORK_PATH.'/environment/assets/views/',
FRAMEWORK_PATH.'/environment/assets/js/',
FRAMEWORK_PATH.'/environment/assets/',
];
/**
* Run before tests.
*/
public function setUp(): void
{
// Make backup of current config
$config = TESTING_PATH.'/app/Config/app.php';
$this->configBackup = file_get_contents($config);
// Make other files
// Make backup of current config
$config = TESTING_PATH.'/app/Config/app.php';
$this->configBackup = file_get_contents($config);
// Make other files
if (!is_dir(TESTING_PATH.'/assets/views/'))
mkdir(TESTING_PATH.'/assets/views/', 0777, true);
if (!is_file(TESTING_PATH.'/assets/views/localize.php'))
Expand All @@ -45,43 +45,43 @@ public function setUp(): void
mkdir(TESTING_PATH.'/assets/js/', 0777, true);
if (!is_file(TESTING_PATH.'/assets/js/excluded.js'))
file_put_contents(TESTING_PATH.'/assets/js/excluded.js', '__( \'Excluded text\', \'my-app\' );');
// Override config
file_put_contents($config, '<?php
return [
\'namespace\' => \'MyApp\',
\'type\' => \'theme\',
\'version\' => \'1.0.0\',
\'author\' => \'Developer <developer@wpmvc>\',
\'paths\' => [
\'base\' => __DIR__ . \'/../\',
\'controllers\' => __DIR__ . \'/../Controllers/\',
\'views\' => __DIR__ . \'/../../assets/views/\',
],
\'localize\' => [
\'textdomain\' => \'my-app\',
\'path\' => __DIR__ . \'/../../assets/lang/\',
// Override config
file_put_contents($config, '<?php
return [
\'namespace\' => \'MyApp\',
\'type\' => \'theme\',
\'version\' => \'1.0.0\',
\'author\' => \'Developer <developer@wpmvc>\',
\'paths\' => [
\'base\' => __DIR__ . \'/../\',
\'controllers\' => __DIR__ . \'/../Controllers/\',
\'views\' => __DIR__ . \'/../../assets/views/\',
],
\'localize\' => [
\'textdomain\' => \'my-app\',
\'path\' => __DIR__ . \'/../../assets/lang/\',
\'translations\' => [
\'file_exclusions\' => [\'excluded.php\', \'excluded.js\'],
],
],
];'
);
],
];'
);
}
/**
/**
* Restore bootstrap config.
* @since
*/
public function tearDown(): void
{
parent::tearDown();
file_put_contents(TESTING_PATH.'/app/Config/app.php', $this->configBackup);
}
public function tearDown(): void
{
parent::tearDown();
file_put_contents(TESTING_PATH.'/app/Config/app.php', $this->configBackup);
}
/**
* Test when configuration is set.
* @group pot
* @group localization
*/
public function testPOTExclusion()
public function testPOTExclusion()
{
// Prepare
$loader = new PoLoader;
Expand All @@ -99,7 +99,7 @@ public function testPOTExclusion()
* @group po
* @group localization
*/
public function testPOExclusion()
public function testPOExclusion()
{
// Prepare
$loader = new PoLoader;
Expand Down

0 comments on commit 2506759

Please sign in to comment.