cvs: pear /MDB2/tests MDB2_api_testcase.php

From: Date: Wed, 25 Apr 2007 09:11:35 +0000
Subject: cvs: pear /MDB2/tests MDB2_api_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-46157@lists.php.net to get a copy of this message
quipo Wed Apr 25 09:11:35 2007 UTC Modified files: /pear/MDB2/tests MDB2_api_testcase.php Log: added testcase for exec() http://cvs.php.net/viewvc.cgi/pear/MDB2/tests/MDB2_api_testcase.php?r1=1.21&r2=1.22&diff_format=u Index: pear/MDB2/tests/MDB2_api_testcase.php diff -u pear/MDB2/tests/MDB2_api_testcase.php:1.21 pear/MDB2/tests/MDB2_api_testcase.php:1.22 --- pear/MDB2/tests/MDB2_api_testcase.php:1.21 Sat Feb 3 13:23:43 2007 +++ pear/MDB2/tests/MDB2_api_testcase.php Wed Apr 25 09:11:35 2007 @@ -41,7 +41,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_api_testcase.php,v 1.21 2007/02/03 13:23:43 quipo Exp $ +// $Id: MDB2_api_testcase.php,v 1.22 2007/04/25 09:11:35 quipo Exp $ require_once 'MDB2_testcase.php'; @@ -226,6 +226,15 @@ $this->assertTrue(MDB2::isResult($result), 'query: $result returned is not a resource'); } + function testExec() { + if (!$this->methodExists($this->db, 'exec')) { + return; + } + $result = $this->db->exec('UPDATE users SET user_name = user_name WHERE user_id = user_id'); + $this->assertFalse(PEAR::isError($result), 'exec: $result returned is an error'); + $this->assertEquals(0, $result, 'exec: incorrect number of affected rows returned'); + } + function testFetchRow() { $result = $this->standardQuery(); if (!$this->methodExists($result, 'fetchRow')) {

« previous php.pear.cvs (#46157) next »