-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔤 to change the class reference to controllers
- Loading branch information
Showing
11 changed files
with
447 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.