Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 118 | All time: 9,530 This week: 660 |
Version | License | PHP version | Categories | |||
php-testbed 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Language, Testing |
<?php include './vendor/autoload.php'; ?>
|
A técnica do teste de mesa ajuda programadores de qualquer nível a compreender melhor a lógica empregada ao verificar o fluxo e mudanças de estados de varíavel no decorrer da execução de um programa.
Esta biblioteca pretende realizar leitura de scripts PHP a fim de executar o teste de mesa informando ao usuário cada passo que será tomado pelo processador de script, do início até a conclusão da execução do script.
Ainda estamos em desenvolvimento inicial, por isso a quantidade de recursos da linguagem que são suportados são poucos.
É necessário Composer para o gerenciamento das dependências.
$ git clone https://github.com/ifroariquemes/PHP-TestBed
$ cd PHP-TestBed
$ composer install
Script de teste:
<?php
for($i = 1; $i <= 2; $i++) {
echo $i + 1;
}
Saída:
Script iniciado
Linha 3: --- Entrou no laço FOR ---
Linha 3: A variável $i recebe o valor 1
Linha 3: A condição da estrutura retorna o valor true resultante da operação ($i <= 2) onde $i = 1
Linha 4: Imprime na tela o valor 2 resultante da operação ($i + 1) onde $i = 1
Linha 3: A variável $i tem seu valor incrementado para 2
Linha 3: A condição da estrutura retorna o valor true resultante da operação ($i <= 2) onde $i = 2
Linha 4: Imprime na tela o valor 3 resultante da operação ($i + 1) onde $i = 2
Linha 3: A variável $i tem seu valor incrementado para 3
Linha 3: A condição da estrutura retorna o valor false resultante da operação ($i <= 2) onde $i = 3
Linha 5: --- Saiu do laço FOR ---
Script finalizado
<table>
<tr>
<td><b>Comando</b></td>
<td><b>Incluso na versão</b></td>
</tr>
<tr>
<td colspan="2">
<b>Estruturas condicionais</b>
</td>
</tr>
<tr>
<td>If-Else</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Switch-Case-Default</td>
<td>v0.2.0</td>
</tr>
<tr>
<td colspan="2"><b>Laços de repetição</b></td>
</tr>
<tr>
<td>For</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Foreach</td>
<td>v0.2.0</td>
</tr>
<tr>
<td>While</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Do-While</td>
<td>v0.1.0</td>
</tr>
<tr>
<td colspan="2"><b>Operações aritméticas</b></td>
</tr>
<tr>
<td>Soma (`+`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Subtração (`-`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Multiplicação (`*`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Divisão (`/`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Resto da divisão (`%`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Deslocamento binário (`<<` e `>>`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Incrementação (`++`)</td>
<td>v0.1.0 (posterior)<br>v0.2.0(anterior)</td>
</tr>
<tr>
<td>Decrementação (`--`)</td>
<td>v0.2.0</td>
</tr>
<tr>
<td colspan="2"><b>Operações lógicas</b></td>
</tr>
<tr>
<td>Booleano E (`&&`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Booleano OU (`||`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Bitwise E (`&`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Bitwise OU (`|`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Bitwise OU EXCLUSIVO (`^`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td colspan="2"><b>Operações relacionais</b></td>
</tr>
<tr>
<td>Igual (`==`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Idêntico (`===`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Diferente (`!=`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Não idêntico (`!==`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Maior (`>`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Maior ou igual (`>=`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Menor (`<`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Menor ou igual (`<=`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Nave espacial (`<=>`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td colspan="2"><b>Outros</b></td>
</tr>
<tr>
<td>Echo</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Atribuição (`=`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Concatenação (`.`)</td>
<td>v0.1.0</td>
</tr>
<tr>
<td>Global</td>
<td>v0.2.0</td>
</tr>
<tr>
<td>Parada (`break`)</td>
<td>v0.2.0</td>
</tr>
<tr>
<td>Constantes</td>
<td>v0.2.0 (`const`)<br>em breve (`define`)</td>
</tr>
<tr>
<td>Vetores e Matrizes (`array()` e `[]`)</td>
<td>v0.2.0</td>
</tr>
<tr>
<td>Try-Catch-Finally</td>
<td>v0.2.0</td>
</tr>
<tr>
<td>Throw</td>
<td>v0.2.0</td>
</tr>
</table>
Ajude-nos a fazer esse software dar certo. Veja em milestones que funções essa biblioteca ainda precisa implementar. Ou então revise o que já existe para continuar melhorando a qualidade e desempenho.
Este trabalho está licenciado com uma Licença Creative Commons - Atribuição 4.0 Internacional
Files (97) |
File | Role | Description | ||
---|---|---|---|---|
app (1 directory) | ||||
src (4 files, 3 directories) | ||||
tests (2 files, 1 directory) | ||||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
index.php | Example | Example script | ||
LICENSE.md | Lic. | License text | ||
README.md | Doc. | Documentation | ||
test.php | Aux. | Auxiliary script | ||
_config.yml | Data | Auxiliary data |
Files (97) | / | src |
File | Role | Description | ||
---|---|---|---|---|
Lang (2 directories) | ||||
Node (8 files, 3 directories) | ||||
ScriptCrawler (1 file) | ||||
I18n.php | Class | Class source | ||
Repository.php | Class | Class source | ||
ScriptCrawler.php | Class | Class source | ||
Stylizer.php | Class | Class source |
Files (97) | / | src | / | Node |
File | Role | Description | ||
---|---|---|---|---|
Expr (10 files, 2 directories) | ||||
Scalar (5 files) | ||||
Stmt (14 files) | ||||
NodeBaseAbstract.php | Class | Class source | ||
NodeBaseInterface.php | Class | Class source | ||
NodeExprAbstract.php | Class | Class source | ||
NodeExprInterface.php | Class | Class source | ||
NodeLoader.php | Class | Class source | ||
NodeScalarAbstract.php | Class | Class source | ||
NodeUsableAbstract.php | Class | Class source | ||
NodeUsableInterface.php | Class | Class source |
Files (97) | / | src | / | Node | / | Expr |
File | Role | Description | ||
---|---|---|---|---|
AssignOp (13 files) | ||||
BinaryOp (28 files) | ||||
ArrayDimFetch.php | Class | Class source | ||
Array_.php | Class | Class source | ||
Assign.php | Class | Class source | ||
ConstFetch.php | Class | Class source | ||
PostDec.php | Class | Class source | ||
PostInc.php | Class | Class source | ||
PreDec.php | Class | Class source | ||
PreInc.php | Class | Class source | ||
Ternary.php | Class | Class source | ||
Variable.php | Class | Class source |
Files (97) | / | src | / | Node | / | Expr | / | AssignOp |
File | Role | Description |
---|---|---|
BitwiseAnd.php | Class | Class source |
BitwiseOr.php | Class | Class source |
BitwiseXor.php | Class | Class source |
Concat.php | Class | Class source |
Div.php | Class | Class source |
Minus.php | Class | Class source |
Mod.php | Class | Class source |
Mul.php | Class | Class source |
NodeAssignOpAbstract.php | Class | Class source |
Plus.php | Class | Class source |
Pow.php | Class | Class source |
ShiftLeft.php | Class | Class source |
ShiftRight.php | Class | Class source |
Files (97) | / | src | / | Node | / | Expr | / | BinaryOp |
File | Role | Description |
---|---|---|
BitwiseAnd.php | Class | Class source |
BitwiseOr.php | Class | Class source |
BitwiseXor.php | Class | Class source |
BooleanAnd.php | Class | Class source |
BooleanOr.php | Class | Class source |
Coalesce.php | Class | Class source |
Concat.php | Class | Class source |
Div.php | Class | Class source |
Equal.php | Class | Class source |
Greater.php | Class | Class source |
GreaterOrEqual.php | Class | Class source |
Identical.php | Class | Class source |
LogicalAnd.php | Class | Class source |
LogicalOr.php | Class | Class source |
LogicalXor.php | Class | Class source |
Minus.php | Class | Class source |
Mod.php | Class | Class source |
Mul.php | Class | Class source |
NodeBinaryOpAbstract.php | Class | Class source |
NotEqual.php | Class | Class source |
NotIdentical.php | Class | Class source |
Plus.php | Class | Class source |
Pow.php | Class | Class source |
ShiftLeft.php | Class | Class source |
ShiftRight.php | Class | Class source |
Smaller.php | Class | Class source |
SmallerOrEqual.php | Class | Class source |
Spaceship.php | Class | Class source |
Files (97) | / | src | / | Node | / | Scalar |
File | Role | Description |
---|---|---|
DNumber.php | Class | Class source |
Encapsed.php | Class | Class source |
EncapsedStringPart.php | Class | Class source |
LNumber.php | Class | Class source |
String_.php | Class | Class source |
Files (97) | / | src | / | Node | / | Stmt |
File | Role | Description |
---|---|---|
Break_.php | Class | Class source |
Const_.php | Class | Class source |
Do_.php | Class | Class source |
Echo_.php | Class | Class source |
ElseIf_.php | Class | Class source |
Foreach_.php | Class | Class source |
For_.php | Class | Class source |
Global_.php | Class | Class source |
If_.php | Class | Class source |
Nop.php | Class | Class source |
Switch_.php | Class | Class source |
Throw_.php | Class | Class source |
TryCatch.php | Class | Class source |
While_.php | Class | Class source |
Files (97) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Node (1 directory) | ||||
bootstrap.php | Aux. | Auxiliary script | ||
TestCase.php | Class | Class source |
Files (97) | / | tests | / | Node | / | Expr | / | Assign |
File | Role | Description |
---|---|---|
AssignSource.php | Aux. | Auxiliary script |
AssignTest.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.