Browse Source

Release v1.0

pull/3/head 1.0
parent
commit
ea018989b2
  1. 2
      Makefile
  2. 6
      composer.json
  3. 7
      debian/changelog
  4. 2
      debian/composer.json
  5. 2
      debian/control
  6. 4
      debian/files
  7. 24
      tests/src/Ease/SQL/EngineTest.php
  8. BIN
      tests/test.sqlite

2
Makefile

@ -1,4 +1,4 @@
repoversion=$(shell LANG=C aptitude show php-ease-fluentpdo | grep Version: | awk '{print $$2}')
repoversion=$(shell LANG=C aptitude show php-vitexsoftware-ease-fluentpdo | grep Version: | awk '{print $$2}')
nextversion=$(shell echo $(repoversion) | perl -ne 'chomp; print join(".", splice(@{[split/\./,$$_]}, 0, -1), map {++$$_} pop @{[split/\./,$$_]}), "\n";')
all:

6
composer.json

@ -8,9 +8,9 @@
}
],
"require": {
"vitexsoftware/ease-core": "dev-master",
"fpdo/fluentpdo": "dev-master",
"robmorgan/phinx": "^0.12.3"
"robmorgan/phinx": "^0.12.3",
"vitexsoftware/ease-core": "^1.1",
"fpdo/fluentpdo": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^9",

7
debian/changelog

@ -1,4 +1,4 @@
php-ease-fluentpdo (0.2.6) UNRELEASED; urgency=medium
php-vitexsoftware-ease-fluentpdo (1.0) main; urgency=medium
* Initial release. (Closes: #XXXXXX)
* twbootstrap renamed to bootstrap
@ -15,5 +15,8 @@ php-ease-fluentpdo (0.2.6) UNRELEASED; urgency=medium
* Release v0.2.4
* Merge origin/master
* Update with null columns fixed
* Engine Unit Tests
* Engine Unit Tests
*
-- CyberVitexus <vitex@exiv.jinonice.czf> Mon, 13 Jul 2020 15:22:21 +0200
-- CyberVitexus <vitex@exiv.jinonice.czf> Tue, 11 Aug 2020 12:48:59 +0200

2
debian/composer.json

@ -20,5 +20,5 @@
"conflict": {
"deb/ease-framework": "*"
},
"address": "0.2.6"
"address": "1.0"
}

2
debian/control

@ -1,4 +1,4 @@
` Source: php-vitexsoftware-ease-fluentpdo
Source: php-vitexsoftware-ease-fluentpdo
Build-Depends: debhelper (>= 7.0.50~)
Section: web
Standards-Version: 3.9.8

4
debian/files

@ -1,2 +1,2 @@
php-ease-fluentpdo_0.2.6_all.deb web optional
php-ease-fluentpdo_0.2.6_amd64.buildinfo web optional
php-vitexsoftware-ease-fluentpdo_1.0_amd64.buildinfo web optional
php-vitexsofware-ease-fluentpdo_1.0_all.deb web optional

24
tests/src/Ease/SQL/EngineTest.php

@ -15,13 +15,22 @@ class EngineTest extends \PHPUnit\Framework\TestCase {
protected $object;
protected $lastId = null;
private function updateLastId() {
$this->lastId = $this->object->listingQuery()->orderBy('id DESC')->limit(1)->fetchColumn(0);
}
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp(): void {
$this->object = new Engine(null, ['myTable' => 'test', 'createColumn' => 'created', 'lastModifiedColumn' => 'updated']);
$this->lastId = $this->object->listingQuery()->orderBy('id DESC')->limit(1)->fetchColumn(0);
$this->object = new Engine(null, [
'myTable' => 'test',
'createColumn' => 'created',
'lastModifiedColumn' => 'updated',
'nameColumn' => 'key'
]);
$this->updateLastId();
}
/**
@ -57,7 +66,8 @@ class EngineTest extends \PHPUnit\Framework\TestCase {
* @covers Ease\SQL\Engine::getRecordName
*/
public function testGetRecordName() {
$this->assertEquals('', $this->object->GetRecordName());
$this->object->loadFromSQL(1);
$this->assertEquals('', $this->object->getRecordName());
}
/**
@ -120,21 +130,21 @@ class EngineTest extends \PHPUnit\Framework\TestCase {
* @covers Ease\SQL\Engine::getFluentPDO
*/
public function testGetFluentPDO() {
$this->assertEquals('Envms\FluentPDO\Query', $this->object->getFluentPDO());
$this->assertInstanceOf('Envms\FluentPDO\Query', $this->object->getFluentPDO());
}
/**
* @covers Ease\SQL\Engine::listingQuery
*/
public function testListingQuery() {
$this->assertEquals('Envms\FluentPDO\Queries\Select', get_class($this->object->listingQuery()));
$this->assertInstanceOf('Envms\FluentPDO\Queries\Select', $this->object->listingQuery());
}
/**
* @covers Ease\SQL\Engine::getColumnsFromSQL
*/
public function testGetColumnsFromSQL() {
$this->assertEquals('', $this->object->GetColumnsFromSQL(['id']));
$this->assertEquals([2 => ['id' => 2]], $this->object->getColumnsFromSQL(['id'], ['id' => 2], 'id', 'id'));
}
/**
@ -163,7 +173,7 @@ class EngineTest extends \PHPUnit\Framework\TestCase {
*/
public function testDbsync() {
$this->object->setData(['id' => 3, 'key' => 'thrid', 'value' => 'newone']);
$this->assertEquals('', $this->object->dbsync());
$this->assertTrue($this->object->dbsync());
}
/**

BIN
tests/test.sqlite

Binary file not shown.
Loading…
Cancel
Save