/**
  * Test for building a mapsicle object with a valid XML file.
  */
 function testBuildMapsicle()
 {
     $sqlmap =& MapsicleFactory::buildMapsicle('etc/mapsicle.xml');
     if (PEAR::isError($sqlmap)) {
         $this->fail($sqlmap->getMessage());
     }
 }
 /**
  * Test if the correct mapping is created with without specifying a
  * delimiter (the delimiter should be #).  And with a different delimiter
  * (!).
  */
 function testDefaultDelimiter1()
 {
     $config = 'etc/mapsicle.default.delimiter.xml';
     $sqlmap =& MapsicleFactory::buildMapsicle($config);
     if (PEAR::isError($sqlmap)) {
         $this->fail($sqlmap->getMessage());
     }
     $mapping =& $sqlmap->mappings['Customer.findById#'];
     $this->assertEquals($mapping->delimiter, '#');
     $mapping =& $sqlmap->mappings['Customer.findById!'];
     $this->assertEquals($mapping->delimiter, '!');
 }
Beispiel #3
0
 /**
  * Setup the test fixtures.  Create a Mapsicle object from the test
  * configuration file.
  */
 function setUp()
 {
     $this->sqlmap =& MapsicleFactory::buildMapsicle(MAPSICLE_TEST_CONFIG);
     $this->db =& $this->sqlmap->db;
 }