Esempio n. 1
0
 /**
  * @depends testFetchObjectStdClass
  */
 public function testFetchObjectCustom(DBALite_Statement $stmt)
 {
     $arg1 = 'bar';
     $arg2 = 'baz';
     $expected = new Foo($arg1, $arg2);
     $expected->ProductID = 43;
     $expected->ProductName = 'Ipoh Coffee';
     $expected->SupplierID = 20;
     $expected->CategoryID = 1;
     $expected->QuantityPerUnit = '16 - 500 g tins';
     $expected->UnitPrice = 46;
     $expected->UnitsInStock = 17;
     $expected->ReorderLevel = 25;
     $foo_args = array($arg1, $arg2);
     $actual = $stmt->fetchObject('Foo', $foo_args);
     $this->assertEquals($expected, $actual);
     return $stmt;
 }