FirebirdTest.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category ZendX
  16. * @package ZendX_Db
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. require_once 'Zend/Db/Table/TestCommon.php';
  22. PHPUnit_Util_Filter::addFileToFilter(__FILE__);
  23. class ZendX_Db_Table_FirebirdTest extends Zend_Db_Table_TestCommon
  24. {
  25. public function testTableInsert()
  26. {
  27. $this->markTestSkipped($this->getDriver().' does not support auto-increment columns.');
  28. }
  29. public function testTableInsertWithSchema()
  30. {
  31. $this->markTestSkipped($this->getDriver() . ' does not report its schema as we expect.');
  32. }
  33. public function testTableCascadeDelete()
  34. {
  35. $table = $this->_table['products'];
  36. $row1 = $table->find(2)->current();
  37. $row1->delete();
  38. // Test for 'false' value in cascade config
  39. $table = $this->_table['bugs'];
  40. $row2 = $table->find(1)->current();
  41. $row2->delete();
  42. $table = $this->_table['bugs_products'];
  43. $select = $table->select()
  44. ->where('"product_id" = ?', 2);
  45. $rows = $table->fetchAll($select);
  46. $this->assertEquals(0, count($rows));
  47. }
  48. public function getDriver()
  49. {
  50. return 'Firebird';
  51. }
  52. }