From ea018989b22da1eef48c23f3b178e5d9b07a943e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=C4=9Bzslav=20Dvo=C5=99=C3=A1k?= Date: Tue, 11 Aug 2020 12:52:05 +0200 Subject: [PATCH] Release v1.0 --- Makefile | 2 +- composer.json | 6 +++--- debian/changelog | 7 +++++-- debian/composer.json | 2 +- debian/control | 2 +- debian/files | 4 ++-- tests/src/Ease/SQL/EngineTest.php | 24 +++++++++++++++++------- tests/test.sqlite | Bin 20480 -> 20480 bytes 8 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 4e97133..d1c78fa 100644 --- a/Makefile +++ b/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: diff --git a/composer.json b/composer.json index 1cbeea3..7546788 100644 --- a/composer.json +++ b/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", diff --git a/debian/changelog b/debian/changelog index 83bc090..c636270 100644 --- a/debian/changelog +++ b/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 Mon, 13 Jul 2020 15:22:21 +0200 + -- CyberVitexus Tue, 11 Aug 2020 12:48:59 +0200 diff --git a/debian/composer.json b/debian/composer.json index f679a37..ac5adf9 100644 --- a/debian/composer.json +++ b/debian/composer.json @@ -20,5 +20,5 @@ "conflict": { "deb/ease-framework": "*" }, - "address": "0.2.6" + "address": "1.0" } diff --git a/debian/control b/debian/control index 7986f70..58b4375 100644 --- a/debian/control +++ b/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 diff --git a/debian/files b/debian/files index aa1e9cc..f6953cf 100644 --- a/debian/files +++ b/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 diff --git a/tests/src/Ease/SQL/EngineTest.php b/tests/src/Ease/SQL/EngineTest.php index 17b2dbe..a4b6dd8 100644 --- a/tests/src/Ease/SQL/EngineTest.php +++ b/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 @@ public function testConstructor() { * @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 @@ public function testGetPdo() { * @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 @@ public function testDbreload() { */ public function testDbsync() { $this->object->setData(['id' => 3, 'key' => 'thrid', 'value' => 'newone']); - $this->assertEquals('', $this->object->dbsync()); + $this->assertTrue($this->object->dbsync()); } /** diff --git a/tests/test.sqlite b/tests/test.sqlite index a2b56ae7af1e8f904b0d96d915b0ce40d8531e1c..b28b9b4e375e292a1cbc0c6a792e86c86b397c3f 100644 GIT binary patch delta 628 zcmaKp%}&BV6osc%F-AL6ZHzHO7-mm0f2Czs5VvlOE91rzO2jBlO3@{K1bG7zpFmu? zbK_IEVC_4gtxP9~91mU$8VF65_>!5)#06-rV4>kSa zJT7CmN;zh(vTKSvoN`*FOJ5VLnH6*jwv3sM?$9$NNFW5?;0wHmLwJU+jG6KJxNSZe zs|i*aHA_RXQviFr0`$Ebzug~%{`XwQFr!L3N(yHsVfKZHF2ZiR=idgsA1XCeOAQJ6 zTgVCeXE?RLWJ68~%!h2nB{A|DshC4H^BJKSBO4he**}lbNe_{AvYvq!ndI2I5{#_n zGp^z`nxZMNk_s0eF_(mw^T5+g97TnalxhWFAt5?J;ANICRzI(Zm-J5sXnA4l4@Kgj NJZc_H8t+K6J^%m~iv|Dy delta 167 zcmZozz}T>WQ6@OhC$l6~AuYcsH?c&)m_dMnk&(ecL4kpRfn}nMGb78!ga&y9b6q1- z1p`AXBXcW56C(p716>0Yp-l>m0^C3?O#Fu!_#g5g+AOHBjo(g|iH$*+-