PHP Classes

File: tests/eMapper/MySQL/ManagerTest.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   eMapper   tests/eMapper/MySQL/ManagerTest.php   Download  
File: tests/eMapper/MySQL/ManagerTest.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: 9 years ago
Size: 661 bytes
 

Contents

Class file image Download
<?php
namespace eMapper\MySQL;

use
eMapper\AbstractManagerTest;
use
eMapper\Mapper;
use
eMapper\Engine\MySQL\MySQLDriver;
use
Acme\Type\RGBColorTypeHandler;

/**
 * MySQL manager test
 * @author emaphp
 * @group mysql
 * @group manager
 */
class ManagerTest extends AbstractManagerTest {
    public function
build() {
       
$config = MySQLTest::$config;
       
$this->driver = new MySQLDriver($config['database'], $config['host'], $config['user'], $config['password']);
       
$this->mapper = new Mapper($this->driver);
       
$this->mapper->addType('Acme\RGBColor', new RGBColorTypeHandler());
       
$this->productsManager = $this->mapper->buildManager('Acme\Entity\Product');
    }
}
?>