PHP 클래스 SQLBuilder\Testing\PDOQueryTestCase

저자: Yo-An Lin ([email protected])
상속: extends SQLBuilder\Testing\QueryTestCase
파일 보기 프로젝트 열기: c9s/sqlbuilder 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$driverType
$dsn database connection string (DSN)
$fixture Fixture files
$fixtureDir Fixture directory path
$options PDO connection options
$pass database password
$pdo PDO connection handle
$schema Schema files
$schemaDir Schema directory path
$user database username

공개 메소드들

메소드 설명
assertDriverQuery ( BaseDriver $driver, SQLBuilder\ToSqlInterface $query )
assertQuery ( SQLBuilder\ToSqlInterface $query, $message = null )
createConnection ( $driverType )
getConnection ( )
getCurrentDSN ( )
getCurrentDriverType ( )
getCurrentPass ( )
getCurrentUser ( )
getDb ( )
getDriverDSN ( $driverType )
getDriverPass ( $driverType )
getDriverUser ( $driverType )
getOptions ( )
query ( $sql, array $args = [] ) * public function assertSqlQueries(ToSqlInterface $query, array $defines) { foreach($defines as $define) { list($driver, $expectedSQL) = $define; $args = new ArgumentArray; $sql = $query->toSql($driver, $args); $this->assertEquals($expectedSQL, $sql); $this->assertDriverQuery($driver, $query); } }
queryOk ( string $sql, array $args = [], $message = null ) Test Query
schema ( )
setUp ( )
setupFixture ( )
setupSchema ( )
testConnection ( )

보호된 메소드들

메소드 설명
assertNoPDOError ( PDO $conn, $message = null )
executeOk ( $sql, $args )
recordOk ( $sql )

메소드 상세

assertDriverQuery() 공개 메소드

public assertDriverQuery ( BaseDriver $driver, SQLBuilder\ToSqlInterface $query )
$driver SQLBuilder\Driver\BaseDriver
$query SQLBuilder\ToSqlInterface

assertNoPDOError() 보호된 메소드

protected assertNoPDOError ( PDO $conn, $message = null )
$conn PDO

assertQuery() 공개 메소드

public assertQuery ( SQLBuilder\ToSqlInterface $query, $message = null )
$query SQLBuilder\ToSqlInterface

createConnection() 공개 메소드

public createConnection ( $driverType )

executeOk() 보호된 메소드

protected executeOk ( $sql, $args )

getConnection() 공개 메소드

public getConnection ( )

getCurrentDSN() 공개 메소드

public getCurrentDSN ( )

getCurrentDriverType() 공개 메소드

getCurrentPass() 공개 메소드

public getCurrentPass ( )

getCurrentUser() 공개 메소드

public getCurrentUser ( )

getDb() 공개 메소드

public getDb ( )

getDriverDSN() 공개 메소드

public getDriverDSN ( $driverType )

getDriverPass() 공개 메소드

public getDriverPass ( $driverType )

getDriverUser() 공개 메소드

public getDriverUser ( $driverType )

getOptions() 공개 메소드

public getOptions ( )

query() 공개 메소드

* public function assertSqlQueries(ToSqlInterface $query, array $defines) { foreach($defines as $define) { list($driver, $expectedSQL) = $define; $args = new ArgumentArray; $sql = $query->toSql($driver, $args); $this->assertEquals($expectedSQL, $sql); $this->assertDriverQuery($driver, $query); } }
public query ( $sql, array $args = [] )
$args array

queryOk() 공개 메소드

Test Query
public queryOk ( string $sql, array $args = [], $message = null )
$sql string SQL statement.
$args array Arguments for executing SQL statement.

recordOk() 보호된 메소드

protected recordOk ( $sql )

schema() 공개 메소드

public schema ( )

setUp() 공개 메소드

public setUp ( )

setupFixture() 공개 메소드

public setupFixture ( )

setupSchema() 공개 메소드

public setupSchema ( )

testConnection() 공개 메소드

public testConnection ( )

프로퍼티 상세

$driverType 공개적으로 프로퍼티

public $driverType

$dsn 공개적으로 프로퍼티

database connection string (DSN)
public $dsn

$fixture 공개적으로 프로퍼티

Fixture files
public $fixture

$fixtureDir 공개적으로 프로퍼티

Fixture directory path
public $fixtureDir

$options 공개적으로 프로퍼티

PDO connection options
public $options

$pass 공개적으로 프로퍼티

database password
public $pass

$pdo 공개적으로 프로퍼티

PDO connection handle
public $pdo

$schema 공개적으로 프로퍼티

Schema files
public $schema

$schemaDir 공개적으로 프로퍼티

Schema directory path
public $schemaDir

$user 공개적으로 프로퍼티

database username
public $user