File: tests/eMapper/SQLite/InsertionTest.php

Recommend this page to a friend!
  Classes of Emmanuel Antico  >  eMapper  >  tests/eMapper/SQLite/InsertionTest.php  >  Download  
File: tests/eMapper/SQLite/InsertionTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: eMapper
Database abstraction layer that maps data types
Author: By
Last change:
Date: 6 years ago
Size: 693 bytes


Class file image Download
namespace eMapper\SQLite;


 * Tests inserting a blob into a SQLite database
 * @author emaphp
 * @group sqlite
 * @group blob
class InsertionTest extends SQLiteTest {
    public function
setUp() {
self::$mapper->sql("CREATE TEMP TABLE \"blob_test\" ( \"test_id\" INTEGER NOT NULL, value BLOB);");
    public function
testInsert() {
self::$mapper->query("INSERT INTO blob_test VALUES (1, %{blob})", self::$blob);
$row = self::$mapper->type('obj')->query("SELECT * FROM blob_test WHERE test_id = 1");
$this->assertEquals(self::$blob, $row->value);
    public function
tearDown() {
self::$mapper->sql("DROP TABLE \"blob_test\";");


For more information send a message to info at phpclasses dot org.