The dkLab created a tdd pl sql for postgresql called PGUnit. The link for download page and more instructions about it is pgunit
As soon as possible I’ll write some article with more informations about it here. The important on this situations is think how much inside on our developers life the TDD concept are!!!
permite utilizar métodos php para mapear stored procedures do postgreSQl e manipular seus parametros e result sets.
- include_once ‘ipgpl.class.php’;
- $p = new ipg(array(‘DEBUG’=>true, ‘dsn’=>”host=localhost;dbname=teste”), “postgres”, “postgres”);
- $p->Teste->Teste(‘Ivo Nascimento’,'10/10/2008′,’2008-10-10′, ‘10:00′,’22:19:35.488543-02′, 10, 10.10);
- print_r($p->Teste->Teste(‘Ivo Nascimento’)->fetch(PDO::FETCH_ASSOC));
- print_r($p->outroteste->soma2(10,20)->fetch());
- print_r($p->outroteste->soma2(ipg::_INFO));
iann@iann:~/Projeto/pl2method$ php teste.php
Array
(
[0] => outroteste
[1] => soma2
[2] => integer
[3] => p1 integer, p2 integer
)
iann@iann:~/Projeto/pl2method$ php teste.php
valor: Ivo Nascimento => 'Ivo Nascimento' Character
valor: 10/10/2008 => '10/10/2008' Date
valor: 2008-10-10 => '2008-10-10' Date
valor: 10:00 => '10:00' Time
valor: 22:19:35.488543-02 => '22:19:35.488543-02' Time
valor: 10 => 10 Integer
valor: 10.1 => 10.1 Float
valor: Ivo Nascimento => 'Ivo Nascimento' Character
Array
(
[teste] => Ivo Nascimento
)
valor: 10 => 10 Integer
valor: 20 => 20 Integer
Array
(
[soma2] => 30
[0] => 30
)
Array
(
[0] => outroteste
[1] => soma2
[2] => integer
[3] => p1 integer, p2 integer
)
Comentários Recentes