/**
  * @covers ::initialize
  * @covers ::get
  */
 public function testStatic()
 {
     $source = $this->getNullSource();
     Converter::initialize($source);
     $converter = Converter::get();
     $this->assertSame($source, $converter->getSource());
 }
 public function setUp()
 {
     parent::setUp();
     $this->logger = new TestLogger();
     Converter::initialize(new NullSource());
     DB::setConfig(['dsn' => 'mysql:dbname=clippings/transfer;host=127.0.0.1', 'username' => 'root']);
     DB::get()->execute('ALTER TABLE Basket AUTO_INCREMENT = 1');
     DB::get()->execute('ALTER TABLE ProductItem AUTO_INCREMENT = 1');
     DB::get()->setLogger($this->logger);
     DB::get()->beginTransaction();
     Container::clear();
 }
 public function setUp()
 {
     parent::setUp();
     $this->logger = new TestLogger();
     DB::setConfig(['dsn' => 'mysql:dbname=clippings/purchases;host=127.0.0.1', 'username' => 'root', 'escaping' => DB::ESCAPING_MYSQL]);
     Converter::initialize(new NullSource());
     DB::get()->execute('ALTER TABLE PurchaseItem AUTO_INCREMENT = 6');
     DB::get()->execute('ALTER TABLE StorePurchase AUTO_INCREMENT = 3');
     DB::get()->setLogger($this->logger);
     DB::get()->beginTransaction();
     Container::clear();
 }
Exemple #4
0
 public function setUp()
 {
     parent::setUp();
     Converter::initialize(new NullSource());
     Container::clear();
 }