示例#1
0
 public function testGetTypeItemNotFound()
 {
     $context = \TestHelperJobs::getContext();
     $aimeos = \TestHelperJobs::getAimeos();
     $object = new TestAbstract($context, $aimeos);
     $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
     $object->getTypeItemPublic('product/type', 'product', 'test');
 }
示例#2
0
 protected function setUp()
 {
     parent::setUp();
     $this->fileDirectory = __DIR__ . '/file_directory';
     if (!is_dir($this->fileDirectory)) {
         mkdir($this->fileDirectory);
     }
     $information = $this->getInformationAboutCurrentUpdateFile();
     @unlink($this->fileDirectory . '/' . $information['version'] . '_fias_delta_xml.rar');
 }
示例#3
0
 protected function setUp()
 {
     parent::setUp();
     $this->addressObjectTable = 'address_objects';
     $this->housesTable = 'houses';
     $this->db->execute('TRUNCATE TABLE address_objects CASCADE');
     $this->db->execute('TRUNCATE TABLE houses CASCADE');
     $addressObjects = [['5c8b06f1-518e-496e-b683-7bf917e0d70b', '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', NULL, 'Москва', NULL, 'г'], ['afdda482-42ae-45d3-9af1-61ac6da41105', '0ecde158-a58f-43af-9707-aa6dd3484b56', '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', 'Тверская', NULL, 'ул']];
     $this->db->execute('INSERT INTO ?f ("id", "address_id", "parent_id", "title", "postal_code", "prefix")
         VALUES ?v', [$this->addressObjectTable, $addressObjects]);
     $houses = [['a64330e3-7a41-41ee-a8a2-41db8693c584', 'a64330e3-7a41-41ee-a8a2-41db8693c584', '0ecde158-a58f-43af-9707-aa6dd3484b56', '02', '1', 'нет'], ['b3ace9e8-dead-4e2c-9c56-e524aef28082', '4fd3b082-34bf-4ad9-8f27-c5c92952554c', '0ecde158-a58f-43af-9707-aa6dd3484b56', '02a', '02a', null]];
     $this->db->execute('INSERT INTO ?f ("id", "house_id", "address_id", "number", "structure", "building")
         VALUES ?v', [$this->housesTable, $houses]);
 }
示例#4
0
 protected function setUp()
 {
     parent::setUp();
     $this->db = $this->container->getDb();
     $this->table = 'test_table';
     $results = [];
     for ($i = 1; $i < 200; ++$i) {
         $results[] = ['xmlId' => $i];
     }
     $this->reader = $this->getReaderMock($this, [$results]);
     $this->db->execute('DROP TABLE IF EXISTS ?f', [$this->table]);
     $this->db->execute('CREATE TEMP TABLE ?f (id integer)', [$this->table]);
     $this->db->execute('INSERT INTO ?f SELECT generate_series(0,499)', [$this->table]);
 }
示例#5
0
 protected function setUp()
 {
     parent::setUp();
     $this->table = 'test_table';
 }
示例#6
0
 public function testInjectController()
 {
     $cntl = $this->getMockBuilder('\\Aimeos\\Controller\\Jobs\\Iface')->getMock();
     TestAbstract::injectController('Test', $cntl);
 }
示例#7
0
 protected function setUp()
 {
     parent::setUp();
     $results = [['HOUSEID' => 'a64330e3-7a41-41ee-a8a2-41db8693c584', 'HOUSEGUID' => 'a64330e3-7a41-41ee-a8a2-41db8693c584', 'PREVIOUSID' => 'a64330e3-7a41-41ee-a8a2-41db8693c584', 'AOGUID' => '77303f7c-452b-4e73-b2b0-cbc59fe636c5', 'HOUSENUM' => '02', 'BUILDNUM' => '123', 'STRUCNUM' => 'нет'], ['HOUSEID' => '00000000-0000-0000-0000-000000000000', 'HOUSEGUID' => '00000000-0000-0000-0000-000000000000', 'PREVIOUSID' => '00000000-0000-0000-0000-000000000000', 'AOGUID' => '77303f7c-452b-4e73-b2b0-cbc59fe636c5', 'HOUSENUM' => '1', 'BUILDNUM' => '2', 'STRUCNUM' => '3']];
     $this->reader = $this->getReaderMock($this, [$results]);
 }
示例#8
0
 /**
  * SetUp include de nodige testclasses.
  */
 public function setUp()
 {
     parent::setUp();
     require_once __DIR__ . '/Data/EmptyMappingGeneratorExtender.php';
 }
示例#9
0
 protected function setUp()
 {
     parent::setUp();
     $this->storage = new AddressStorage($this->db);
 }
示例#10
0
 protected function setUp()
 {
     parent::setUp();
     $results = [['AOID' => '5c8b06f1-518e-496e-b683-7bf917e0d70b', 'AOGUID' => '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', 'PREVIOUSID' => '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', 'PARENTGUID' => NULL, 'FORMALNAME' => 'Москваа', 'POSTALCODE' => NULL, 'SHORTNAME' => 'г'], ['AOID' => '00000000-0000-0000-0000-000000000000', 'AOGUID' => '00000000-0000-0000-0000-000000000000', 'PREVIOUSID' => '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', 'PARENTGUID' => '0c5b2444-70a0-4932-980c-b4dc0d3f02b5', 'FORMALNAME' => 'Все вы, питерские, идиоты какие-то', 'POSTALCODE' => NULL, 'SHORTNAME' => 'пл']];
     $this->reader = $this->getReaderMock($this, [$results]);
 }