/include/SQL/SQL_Query/tests/Query/setType.php
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
- <?php
- //
- // $Id$
- //
-
- require_once 'SQL/Query.php';
-
- class tests_Query_setType extends tests_UnitTest
- {
- // check that the type can be set via the constructor
- function test_viaConstructor()
- {
- $query = new SQL_Query( 'table', 'insert');
- $this->assertEquals('insert',$query->getType());
- }
-
- // set the type via the setType method
- function test_setType()
- {
- $query = new SQL_Query('');
- $query->setType('delete');
-
- $this->assertEquals('delete',$query->getType());
- }
-
- }
-
- ?>