PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/include/SQL/SQL_Query/tests/Query/setType.php

https://github.com/radicaldesigns/amp
PHP | 28 lines | 17 code | 6 blank | 5 comment | 0 complexity | 237d73f2e6f5d5ea11dbb29ad82a9462 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, BSD-3-Clause, LGPL-2.0, CC-BY-SA-3.0, AGPL-1.0
  1. <?php
  2. //
  3. // $Id$
  4. //
  5. require_once 'SQL/Query.php';
  6. class tests_Query_setType extends tests_UnitTest
  7. {
  8. // check that the type can be set via the constructor
  9. function test_viaConstructor()
  10. {
  11. $query = new SQL_Query( 'table', 'insert');
  12. $this->assertEquals('insert',$query->getType());
  13. }
  14. // set the type via the setType method
  15. function test_setType()
  16. {
  17. $query = new SQL_Query('');
  18. $query->setType('delete');
  19. $this->assertEquals('delete',$query->getType());
  20. }
  21. }
  22. ?>