Skip to content

Commit

Permalink
🔤 to change the class reference to controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Jun 22, 2019
1 parent 0643f61 commit d70fefb
Show file tree
Hide file tree
Showing 11 changed files with 447 additions and 447 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//Constantes e configurações
require_once 'includes/constantes.php';
require_once '../base/classes/webform/TApplication.class.php';
require_once 'classes/autoload_sysgen.php';
require_once 'controllers/autoload_sysgen.php';


$app = new TApplication(); // criar uma instancia do objeto aplicacao
Expand Down
2 changes: 1 addition & 1 deletion tests/CreateApiControllesFilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/CreateControllersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

Expand Down
118 changes: 59 additions & 59 deletions tests/TCreateAutoloadTest.php
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
<?php
/**
* SysGen - System Generator with Formdin Framework
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* @author Bjverde <bjverde@yahoo.com.br>
* @license https://github.com/bjverde/sysgen/blob/master/LICENSE GPL-3.0
* @link https://github.com/bjverde/sysgen
*
* PHP Version 5.6
*/

$pathBase = __DIR__.'/../../base/';
require_once $pathBase.'classes/constants.php';
require_once $pathBase.'classes/helpers/autoload_formdin_helper.php';

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

define('TEOL',"\n");
define('TTAB',chr(9));
/**
* TDAOCreate test case.
*/
class TCreateAutoloadTest extends TestCase
{

/**
* @var TCreateAutoload
*/
private $testClass;

/**
* Prepares the environment before running a test.
*/
protected function setUp(){
$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']='test';
parent::setUp();
$this->testClass = new TCreateAutoload();
}

/**
* Cleans up the environment after running a test.
*/
protected function tearDown(){
$this->testClass = null;
parent::tearDown();
}

public function testShow_numLines(){
$esperado = 24;

$resultArray = $this->testClass->show('array');
$size = count($resultArray);
$this->assertEquals( $esperado, $size);
}
<?php
/**
* SysGen - System Generator with Formdin Framework
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* @author Bjverde <bjverde@yahoo.com.br>
* @license https://github.com/bjverde/sysgen/blob/master/LICENSE GPL-3.0
* @link https://github.com/bjverde/sysgen
*
* PHP Version 5.6
*/

$pathBase = __DIR__.'/../../base/';
require_once $pathBase.'classes/constants.php';
require_once $pathBase.'classes/helpers/autoload_formdin_helper.php';

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

define('TEOL',"\n");
define('TTAB',chr(9));
/**
* TDAOCreate test case.
*/
class TCreateAutoloadTest extends TestCase
{

/**
* @var TCreateAutoload
*/
private $testClass;

/**
* Prepares the environment before running a test.
*/
protected function setUp(){
$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']='test';
parent::setUp();
$this->testClass = new TCreateAutoload();
}

/**
* Cleans up the environment after running a test.
*/
protected function tearDown(){
$this->testClass = null;
parent::tearDown();
}

public function testShow_numLines(){
$esperado = 24;

$resultArray = $this->testClass->show('array');
$size = count($resultArray);
$this->assertEquals( $esperado, $size);
}
}
2 changes: 1 addition & 1 deletion tests/TCreateDAOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

Expand Down
164 changes: 82 additions & 82 deletions tests/TCreateFileContentTest.php
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
<?php
/**
* SysGen - System Generator with Formdin Framework
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* @author Bjverde <bjverde@yahoo.com.br>
* @license https://github.com/bjverde/sysgen/blob/master/LICENSE GPL-3.0
* @link https://github.com/bjverde/sysgen
*
* PHP Version 5.6
*/

$pathBase = __DIR__.'/../../base/';
require_once $pathBase.'classes/constants.php';
require_once $pathBase.'classes/helpers/autoload_formdin_helper.php';

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

/**
* TDAOCreate test case.
*/
class TCreateFileContentTest extends TestCase
{

/**
* @var TCreateAutoload
*/
private $create;

/**
* Prepares the environment before running a test.
*/
protected function setUp(){
$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']='test';
parent::setUp();
$this->create = new TCreateFileContent();
}

/**
* Cleans up the environment after running a test.
*/
protected function tearDown(){
$this->create = null;
parent::tearDown();
}

public function testGetGenSystemAcronym(){
$expected = 'test';
$result = $this->create->getGenSystemAcronym();
$this->assertEquals( $expected, $result);
}

public function testAddSysGenHeaderNote_numLines(){
$expectedQtd = 10;

$this->create->addSysGenHeaderNote();
$result = $this->create->getLinesArray();
$sizeResult = CountHelper::count($result);
$this->assertEquals( $expectedQtd, $sizeResult);
}

public function testShowContent_getArray(){
$expectedQtd = 10;

$this->create->addSysGenHeaderNote();
$result = $this->create->showContent('array');
$sizeResult = CountHelper::count($result);
$this->assertEquals( $expectedQtd, $sizeResult);
}

public function testShowContent_string(){
$expected = true;

$this->create->addSysGenHeaderNote();
$result = $this->create->showContent();
$result = is_string($result);
$this->assertEquals( $expected, $result);
}
<?php
/**
* SysGen - System Generator with Formdin Framework
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* @author Bjverde <bjverde@yahoo.com.br>
* @license https://github.com/bjverde/sysgen/blob/master/LICENSE GPL-3.0
* @link https://github.com/bjverde/sysgen
*
* PHP Version 5.6
*/

$pathBase = __DIR__.'/../../base/';
require_once $pathBase.'classes/constants.php';
require_once $pathBase.'classes/helpers/autoload_formdin_helper.php';

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

/**
* TDAOCreate test case.
*/
class TCreateFileContentTest extends TestCase
{

/**
* @var TCreateAutoload
*/
private $create;

/**
* Prepares the environment before running a test.
*/
protected function setUp(){
$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']='test';
parent::setUp();
$this->create = new TCreateFileContent();
}

/**
* Cleans up the environment after running a test.
*/
protected function tearDown(){
$this->create = null;
parent::tearDown();
}

public function testGetGenSystemAcronym(){
$expected = 'test';
$result = $this->create->getGenSystemAcronym();
$this->assertEquals( $expected, $result);
}

public function testAddSysGenHeaderNote_numLines(){
$expectedQtd = 10;

$this->create->addSysGenHeaderNote();
$result = $this->create->getLinesArray();
$sizeResult = CountHelper::count($result);
$this->assertEquals( $expectedQtd, $sizeResult);
}

public function testShowContent_getArray(){
$expectedQtd = 10;

$this->create->addSysGenHeaderNote();
$result = $this->create->showContent('array');
$sizeResult = CountHelper::count($result);
$this->assertEquals( $expectedQtd, $sizeResult);
}

public function testShowContent_string(){
$expected = true;

$this->create->addSysGenHeaderNote();
$result = $this->create->showContent();
$result = is_string($result);
$this->assertEquals( $expected, $result);
}
}
2 changes: 1 addition & 1 deletion tests/TCreateFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

$path = __DIR__.'/../';
require_once $path.'includes/constantes.php';
require_once $path.'classes/autoload_sysgen.php';
require_once $path.'controllers/autoload_sysgen.php';

use PHPUnit\Framework\TestCase;

Expand Down

0 comments on commit d70fefb

Please sign in to comment.