From 21a909f819cc340564770ea63e383ee6013fc167 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 15 Jan 2014 19:03:29 +0100 Subject: Removed ?> from buildscripts and demos --- demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page') diff --git a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page index 80a155cb..55d55c31 100755 --- a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page +++ b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page @@ -46,7 +46,6 @@ class PersonTest extends UnitTestCase $this->assertNotNull($person, "Person not returned"); } } -?>

Well, the example sure looks easy enough! We ask a method to "select all", and @@ -54,7 +53,7 @@ it returns a list of person objects. But, what code do we need to write to pass this test?

Note: - Save the PersonTest.php into a tests directory. + Save the PersonTest.php into a tests directory. The unit tests are written for the SimpleTest Unit Testing framework.
@@ -74,7 +73,6 @@ error_reporting(E_ALL); $test = new GroupTest('All tests'); $test->addTestFile('Tests/PersonTest.php'); $test->run(new HtmlReporter()); -?>

To run the tests, point your browser to the "run_test.php" script file @@ -108,7 +106,6 @@ class Person $this->_birthDate = $value; } } -?>

OK, that was fun! The $this->assertXXX(...) methods are built into @@ -125,7 +122,7 @@ method executes our SQL statement (or stored procedure) and returns the result as a list. Each row in the result becomes an entry in the list. Along with queryForList(), there are also delete(), insert(), queryForObject(), queryForPagedList() and a few other methods in the -SQLMap API. +SQLMap API.

Looking at unit test example, we see that the queryForList() method takes the name of the statement we want to run. OK. Easy enough. But where -- cgit v1.2.3