diff --git a/.scrutinizer.yml b/.scrutinizer.yml index f354539..e9dea17 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -6,4 +6,4 @@ tools: php_cpd: true php_hhvm: true php_analyzer: true - php_pdepend: true \ No newline at end of file + php_pdepend: true diff --git a/.travis.yml b/.travis.yml index 9be1486..e2d1096 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,14 @@ sudo: false php: - 5.4 + - 5.5 + - 5.6 + - 7 + +matrix: + fast_finish: true + allow_failures: + - php: 7 cache: directories: @@ -20,8 +28,8 @@ install: before_script: - mkdir -p build/logs - - mysql -e 'create database `test-promotions`;' - - mysql --default-character-set=utf8 test-promotions < tests/test_data/structure.sql + - mysql -e 'create database `OpenBuildings/promotions`;' + - mysql --default-character-set=utf8 OpenBuildings/promotions < tests/test_data/structure.sql script: - phpunit --coverage-clover build/logs/clover.xml diff --git a/LICENSE b/LICENSE index 0c32042..f74208c 100644 --- a/LICENSE +++ b/LICENSE @@ -6,4 +6,4 @@ Redistribution and use in source and binary forms, with or without modification, Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the OpenBuildings nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index f052ca9..170eb24 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,3 @@ The ``promotable_purchase`` behavior adds a promo_code_text field to the purchas Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Yasen Yanev as part of [clippings.com](http://clippings.com) Under BSD-3-Clause license, read LICENSE file. - diff --git a/classes/Jam/Behavior/Promotable/Purchase.php b/classes/Jam/Behavior/Promotable/Purchase.php index 524f31f..34dc698 100644 --- a/classes/Jam/Behavior/Promotable/Purchase.php +++ b/classes/Jam/Behavior/Promotable/Purchase.php @@ -1,3 +1,3 @@ * @copyright (c) 2013 OpenBuildings Ltd. @@ -16,7 +16,7 @@ class Kohana_Jam_Behavior_Promotable_Purchase extends Jam_Behavior { /** * @codeCoverageIgnore */ - public function initialize(Jam_Meta $meta, $name) + public function initialize(Jam_Meta $meta, $name) { parent::initialize($meta, $name); @@ -32,7 +32,7 @@ public function initialize(Jam_Meta $meta, $name) /** * If there is a promo_code object, load it into the promo_code_text - * @param Model_Purchase $purchase + * @param Model_Purchase $purchase */ public function model_after_load(Model_Purchase $purchase) { @@ -45,13 +45,13 @@ public function model_after_load(Model_Purchase $purchase) /** * If there is a new value in promo_code_text, try to load promo_code object. * If the new value is NULL, remove it - * @param Model_Purchase $purchase + * @param Model_Purchase $purchase */ public function model_after_check(Model_Purchase $purchase) { if ($purchase->changed('promo_code_text') AND ! $purchase->errors('promo_code_text')) { - if ($purchase->promo_code_text) + if ($purchase->promo_code_text) { $purchase->promo_code = Jam::find('promo_code', $purchase->promo_code_text); } @@ -61,4 +61,4 @@ public function model_after_check(Model_Purchase $purchase) } } } -} \ No newline at end of file +} diff --git a/classes/Kohana/Jam/Validator/Rule/Purchase/Promocode.php b/classes/Kohana/Jam/Validator/Rule/Purchase/Promocode.php index 5d30fff..be5a862 100644 --- a/classes/Kohana/Jam/Validator/Rule/Purchase/Promocode.php +++ b/classes/Kohana/Jam/Validator/Rule/Purchase/Promocode.php @@ -3,7 +3,7 @@ /** * Validate for available and not expired promo_code_text * Specific for a purchase model - * + * * @package openbuildings\promotions * @author Ivan Kerin * @copyright (c) 2013 OpenBuildings Ltd. diff --git a/classes/Kohana/Model/Collection/Promo/Code.php b/classes/Kohana/Model/Collection/Promo/Code.php index c966bc0..1d93c37 100644 --- a/classes/Kohana/Model/Collection/Promo/Code.php +++ b/classes/Kohana/Model/Collection/Promo/Code.php @@ -37,4 +37,4 @@ public function available_for_purchase(Model_Purchase $purchase) ->or_where('purchase.id', '=', $purchase->id()) ->where_close(); } -} \ No newline at end of file +} diff --git a/classes/Kohana/Model/Collection/Promotion.php b/classes/Kohana/Model/Collection/Promotion.php index 2be196a..5fd90d5 100644 --- a/classes/Kohana/Model/Collection/Promotion.php +++ b/classes/Kohana/Model/Collection/Promotion.php @@ -16,4 +16,4 @@ public function not_expired($current_time = NULL) ->or_where('expires_at', '>=', date('Y-m-d H:i:s', $current_time ?: time())) ->where_close(); } -} \ No newline at end of file +} diff --git a/classes/Kohana/Model/Promo/Code.php b/classes/Kohana/Model/Promo/Code.php index 79bccb2..f58b1fc 100644 --- a/classes/Kohana/Model/Promo/Code.php +++ b/classes/Kohana/Model/Promo/Code.php @@ -8,7 +8,7 @@ * @license http://spdx.org/licenses/BSD-3-Clause */ class Kohana_Model_Promo_Code extends Jam_Model { - + /** * @codeCoverageIgnore */ diff --git a/classes/Model/Collection/Promo/Code.php b/classes/Model/Collection/Promo/Code.php index 3437e6f..e79c762 100644 --- a/classes/Model/Collection/Promo/Code.php +++ b/classes/Model/Collection/Promo/Code.php @@ -1,3 +1,3 @@ =5.3.0", "composer/installers": "*", - "openbuildings/purchases": "~0.8.0", - "openbuildings/shipping": ">=0.8.0,<0.10.0" + "openbuildings/purchases": "^0.9.0", + "openbuildings/shipping": "^0.10.0" }, "require-dev": { "openbuildings/kohana-test-bootsrap": "0.1.*" }, "autoload": { "psr-0": {"Openbuildings\\Promotions\\": "src/"} - }, - "extra": { - "branch-alias": { - "dev-master": "0.6.x-dev" - } } } diff --git a/composer.lock b/composer.lock index 652c1c0..f660273 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "806834e60a96005dd20c31d83ea3d393", + "hash": "809e30df92f54dd51489fca5b4c3c146", "packages": [ { "name": "clippings/freezable", @@ -445,16 +445,16 @@ }, { "name": "openbuildings/jam", - "version": "0.5.4", + "version": "0.5.8", "source": { "type": "git", "url": "https://github.com/OpenBuildings/jam.git", - "reference": "ad125065598fa84458c76d9216538f238b4e915e" + "reference": "9570f3045c0f3ca9ba27d10f4262c57fa0972426" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenBuildings/jam/zipball/ad125065598fa84458c76d9216538f238b4e915e", - "reference": "ad125065598fa84458c76d9216538f238b4e915e", + "url": "https://api.github.com/repos/OpenBuildings/jam/zipball/9570f3045c0f3ca9ba27d10f4262c57fa0972426", + "reference": "9570f3045c0f3ca9ba27d10f4262c57fa0972426", "shasum": "" }, "require": { @@ -494,30 +494,30 @@ "upload", "validation" ], - "time": "2015-04-24 16:19:10" + "time": "2015-07-17 13:21:45" }, { "name": "openbuildings/jam-auth", - "version": "0.3.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/OpenBuildings/jam-auth.git", - "reference": "e991a02c75755b4e30bddc843a3dad6c63219f21" + "reference": "0d84564c6c9a0536d2f75d7dd4fbf405d88ec7d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenBuildings/jam-auth/zipball/e991a02c75755b4e30bddc843a3dad6c63219f21", - "reference": "e991a02c75755b4e30bddc843a3dad6c63219f21", + "url": "https://api.github.com/repos/OpenBuildings/jam-auth/zipball/0d84564c6c9a0536d2f75d7dd4fbf405d88ec7d0", + "reference": "0d84564c6c9a0536d2f75d7dd4fbf405d88ec7d0", "shasum": "" }, "require": { "composer/installers": "*", - "openbuildings/jam": "~0.5.0", + "openbuildings/jam": "^0.5.0", "php": ">=5.3.0" }, "require-dev": { - "facebook/php-sdk": "3.2.*", - "openbuildings/kohana-test-bootsrap": "0.1.*" + "facebook/php-sdk-v4": "^5.0", + "openbuildings/kohana-test-bootsrap": "^0.1.2" }, "type": "kohana-module", "notification-url": "https://packagist.org/downloads/", @@ -541,7 +541,7 @@ "kohana", "login" ], - "time": "2015-02-09 16:24:06" + "time": "2015-09-28 09:11:25" }, { "name": "openbuildings/jam-closuretable", @@ -751,16 +751,16 @@ }, { "name": "openbuildings/purchases", - "version": "0.8.0", + "version": "0.9.0", "source": { "type": "git", "url": "https://github.com/OpenBuildings/purchases.git", - "reference": "189a2762b86e3b84eae6cdff32bce07576e9959b" + "reference": "9a3770e15676481df442a9d14f67a6d8dad1129a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenBuildings/purchases/zipball/189a2762b86e3b84eae6cdff32bce07576e9959b", - "reference": "189a2762b86e3b84eae6cdff32bce07576e9959b", + "url": "https://api.github.com/repos/OpenBuildings/purchases/zipball/9a3770e15676481df442a9d14f67a6d8dad1129a", + "reference": "9a3770e15676481df442a9d14f67a6d8dad1129a", "shasum": "" }, "require": { @@ -768,7 +768,7 @@ "composer/installers": "*", "omnipay/common": "~2.0", "openbuildings/jam": "~0.5.0", - "openbuildings/jam-auth": "~0.3.2", + "openbuildings/jam-auth": "^0.4.0", "openbuildings/jam-locations": "0.1.*", "openbuildings/jam-monetary": "~0.1.19", "php": ">=5.3.0" @@ -815,26 +815,27 @@ "purchase", "store" ], - "time": "2015-03-27 12:22:29" + "time": "2015-09-29 09:48:56" }, { "name": "openbuildings/shipping", - "version": "0.9.0", + "version": "0.10.0", "source": { "type": "git", "url": "https://github.com/OpenBuildings/shipping.git", - "reference": "5b886b4c757838973542814da7a1407eb37928f6" + "reference": "60ff43673262799788e9370fffda3dc110bc21e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenBuildings/shipping/zipball/5b886b4c757838973542814da7a1407eb37928f6", - "reference": "5b886b4c757838973542814da7a1407eb37928f6", + "url": "https://api.github.com/repos/OpenBuildings/shipping/zipball/60ff43673262799788e9370fffda3dc110bc21e3", + "reference": "60ff43673262799788e9370fffda3dc110bc21e3", "shasum": "" }, "require": { "clippings/freezable": "0.2.*", "composer/installers": "*", - "openbuildings/purchases": "~0.8.0", + "openbuildings/jam": "~0.5.5", + "openbuildings/purchases": "^0.9.0", "php": ">=5.3.0" }, "require-dev": { @@ -842,11 +843,6 @@ "openbuildings/kohana-test-bootsrap": "0.1.*" }, "type": "kohana-module", - "extra": { - "branch-alias": { - "dev-master": "0.8.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -868,7 +864,7 @@ "purchase", "shipping" ], - "time": "2015-05-20 12:34:58" + "time": "2015-09-29 10:07:54" }, { "name": "rackspace/php-opencloud", @@ -918,21 +914,20 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.6.7", - "target-dir": "Symfony/Component/EventDispatcher", + "version": "v2.7.5", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/672593bc4b0043a0acf91903bb75a1c82d8f2e02", - "reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae4dcc2a8d3de98bd794167a3ccda1311597c5d9", + "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "psr/log": "~1.0", @@ -949,11 +944,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" } }, @@ -973,25 +968,24 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-05-02 15:18:45" + "time": "2015-09-22 13:49:29" }, { "name": "symfony/http-foundation", - "version": "v2.6.7", - "target-dir": "Symfony/Component/HttpFoundation", + "version": "v2.7.5", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "8a0d00980ef9f6b47ddbf24bdfbf70fead760816" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e1509119f164a0d0a940d7d924d693a7a28a5470" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/8a0d00980ef9f6b47ddbf24bdfbf70fead760816", - "reference": "8a0d00980ef9f6b47ddbf24bdfbf70fead760816", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e1509119f164a0d0a940d7d924d693a7a28a5470", + "reference": "e1509119f164a0d0a940d7d924d693a7a28a5470", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "symfony/expression-language": "~2.4", @@ -1000,15 +994,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1027,7 +1021,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2015-05-02 15:18:45" + "time": "2015-09-22 13:49:29" } ], "packages-dev": [ diff --git a/tests/bootstrap.php b/tests/bootstrap.php index a57ed8c..237f719 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,4 +1,4 @@ -load('database') ->set('default', array( - 'type' => 'MySQL', + 'type' => 'PDO', 'connection' => array( - 'hostname' => 'localhost', - 'database' => 'test-promotions', + 'dsn' => 'mysql:host=localhost;dbname=OpenBuildings/promotions', 'username' => 'root', 'password' => '', 'persistent' => TRUE, ), 'table_prefix' => '', + 'identifier' => '`', 'charset' => 'utf8', 'caching' => FALSE, )); diff --git a/tests/classes/Model/Product.php b/tests/classes/Model/Product.php index 68a4019..f8af220 100644 --- a/tests/classes/Model/Product.php +++ b/tests/classes/Model/Product.php @@ -29,4 +29,4 @@ public function currency() { return $this->currency; } -} \ No newline at end of file +} diff --git a/tests/classes/Model/Purchase.php b/tests/classes/Model/Purchase.php index b5b94f0..c4ce75f 100644 --- a/tests/classes/Model/Purchase.php +++ b/tests/classes/Model/Purchase.php @@ -11,4 +11,4 @@ public static function initialize(Jam_Meta $meta) 'promotable_purchase' => Jam::behavior('promotable_purchase'), )); } -} \ No newline at end of file +} diff --git a/tests/classes/Model/Variation.php b/tests/classes/Model/Variation.php index 70205ef..4d5616c 100644 --- a/tests/classes/Model/Variation.php +++ b/tests/classes/Model/Variation.php @@ -28,4 +28,4 @@ public function currency() { return $this->product->currency; } -} \ No newline at end of file +} diff --git a/tests/classes/Testcase/Promotions.php b/tests/classes/Testcase/Promotions.php index 451cb21..6a56fe9 100644 --- a/tests/classes/Testcase/Promotions.php +++ b/tests/classes/Testcase/Promotions.php @@ -9,7 +9,7 @@ * @copyright (c) 2011-2013 Despark Ltd. */ abstract class Testcase_Promotions extends PHPUnit_Framework_TestCase { - + public function setUp() { parent::setUp(); @@ -19,7 +19,7 @@ public function setUp() public function tearDown() { - Database::instance()->rollback(); + Database::instance()->rollback(); parent::tearDown(); } @@ -27,4 +27,4 @@ public function ids(array $items) { return array_values(array_map(function($item){ return $item->id(); }, $items)); } -} \ No newline at end of file +} diff --git a/tests/test_data/structure.sql b/tests/test_data/structure.sql index bcf5b93..d773311 100644 --- a/tests/test_data/structure.sql +++ b/tests/test_data/structure.sql @@ -84,7 +84,6 @@ DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `email` VARCHAR(254) NOT NULL, - `username` VARCHAR(32) NOT NULL DEFAULT '', `password` VARCHAR(64) NOT NULL, `logins` INT(10) UNSIGNED NOT NULL DEFAULT '0', `last_login` INT(10) UNSIGNED, @@ -92,7 +91,6 @@ CREATE TABLE `users` ( `twitter_uid` VARCHAR(100), `last_login_ip` VARCHAR(40), PRIMARY KEY (`id`), - UNIQUE KEY `uniq_username` (`username`), UNIQUE KEY `uniq_email` (`email`) ) ENGINE=INNODB DEFAULT CHARSET=utf8; @@ -172,7 +170,7 @@ VALUES INSERT INTO `purchases` (`id`, `creator_id`, `number`, `currency`, `monetary`, `is_frozen`, `is_deleted`) VALUES - (1,1,'CNV7IC','EUR','O:31:\"OpenBuildings\\Monetary\\Monetary\":4:{s:18:\"currency_templates\";a:5:{s:3:\"USD\";s:8:\"$:amount\";s:3:\"EUR\";s:10:\"€:amount\";s:3:\"GBP\";s:9:\"£:amount\";s:3:\"BGN\";s:12:\":amount лв\";s:3:\"JPY\";s:9:\"¥:amount\";}s:20:\"\0*\0_default_currency\";s:3:\"GBP\";s:10:\"\0*\0_source\";C:33:\"OpenBuildings\\Monetary\\Source_ECB\":775:{a:33:{s:3:\"USD\";s:6:\"1.3357\";s:3:\"JPY\";s:6:\"132.05\";s:3:\"BGN\";s:6:\"1.9558\";s:3:\"CZK\";s:6:\"25.769\";s:3:\"DKK\";s:6:\"7.4566\";s:3:\"GBP\";s:7:\"0.83850\";s:3:\"HUF\";s:6:\"298.78\";s:3:\"LTL\";s:6:\"3.4528\";s:3:\"LVL\";s:6:\"0.7025\";s:3:\"PLN\";s:6:\"4.1944\";s:3:\"RON\";s:6:\"4.4588\";s:3:\"SEK\";s:6:\"8.6943\";s:3:\"CHF\";s:6:\"1.2374\";s:3:\"NOK\";s:6:\"7.8920\";s:3:\"HRK\";s:6:\"7.5955\";s:3:\"RUB\";s:7:\"43.0625\";s:3:\"TRY\";s:6:\"2.6592\";s:3:\"AUD\";s:6:\"1.4248\";s:3:\"BRL\";s:6:\"3.0086\";s:3:\"CAD\";s:6:\"1.3759\";s:3:\"CNY\";s:6:\"8.1748\";s:3:\"HKD\";s:7:\"10.3570\";s:3:\"IDR\";s:8:\"14855.82\";s:3:\"ILS\";s:6:\"4.7205\";s:3:\"INR\";s:7:\"83.9450\";s:3:\"KRW\";s:7:\"1444.54\";s:3:\"MXN\";s:7:\"17.2205\";s:3:\"MYR\";s:6:\"4.3945\";s:3:\"NZD\";s:6:\"1.6267\";s:3:\"PHP\";s:6:\"58.090\";s:3:\"SGD\";s:6:\"1.6824\";s:3:\"THB\";s:6:\"42.342\";s:3:\"ZAR\";s:7:\"13.0230\";}}s:13:\"\0*\0_precision\";i:2;}',1,0), + (1,1,'CNV7IC','EUR','O:31:\"OpenBuildings\\Monetary\\Monetary\":3:{s:20:\"\0*\0_default_currency\";C:33:\"OpenBuildings\\Monetary\\Source_ECB\":728:{a:31:{s:3:\"USD\";s:6:\"1.1170\";s:3:\"JPY\";s:6:\"134.13\";s:3:\"BGN\";s:6:\"1.9558\";s:3:\"CZK\";s:6:\"27.220\";s:3:\"DKK\";s:6:\"7.4597\";s:3:\"GBP\";s:7:\"0.73520\";s:3:\"HUF\";s:6:\"315.43\";s:3:\"PLN\";s:6:\"4.2343\";s:3:\"RON\";s:6:\"4.4173\";s:3:\"SEK\";s:6:\"9.4527\";s:3:\"CHF\";s:6:\"1.0941\";s:3:\"NOK\";s:6:\"9.5820\";s:3:\"HRK\";s:6:\"7.6360\";s:3:\"RUB\";s:7:\"73.3737\";s:3:\"TRY\";s:6:\"3.4137\";s:3:\"AUD\";s:6:\"1.5967\";s:3:\"BRL\";s:6:\"4.4787\";s:3:\"CAD\";s:6:\"1.4921\";s:3:\"CNY\";s:6:\"7.1099\";s:3:\"HKD\";s:6:\"8.6569\";s:3:\"IDR\";s:8:\"16419.85\";s:3:\"ILS\";s:6:\"4.4024\";s:3:\"INR\";s:7:\"73.8391\";s:3:\"KRW\";s:7:\"1334.11\";s:3:\"MXN\";s:7:\"19.0756\";s:3:\"MYR\";s:6:\"4.9410\";s:3:\"NZD\";s:6:\"1.7585\";s:3:\"PHP\";s:6:\"52.271\";s:3:\"SGD\";s:6:\"1.5960\";s:3:\"THB\";s:6:\"40.603\";s:3:\"ZAR\";s:7:\"15.6728\";}}s:10:\"\0*\0_source\";N;s:13:\"\0*\0_precision\";i:2;}',1,0), (2,1,'AAV7IC','GBP','',0,0); # Dump of table brand_purchases @@ -203,9 +201,9 @@ VALUES # Dump of table users # ------------------------------------------------------------ -INSERT INTO `users` (`id`, `email`, `username`, `password`, `logins`, `last_login`, `facebook_uid`, `twitter_uid`, `last_login_ip`) +INSERT INTO `users` (`id`, `email`, `password`, `logins`, `last_login`, `facebook_uid`, `twitter_uid`, `last_login_ip`) VALUES - (1,'admin@example.com','admin','f02c9f1f724ebcf9db6784175cb6bd82663380a5f8bd78c57ad20d5dfd953f15',5,1374320224,'facebook-test','','10.20.10.1'); + (1,'admin@example.com','f02c9f1f724ebcf9db6784175cb6bd82663380a5f8bd78c57ad20d5dfd953f15',5,1374320224,'facebook-test','','10.20.10.1'); # Dump of table variations diff --git a/tests/tests/Jam/Behavior/Promotable/PurchaseTest.php b/tests/tests/Jam/Behavior/Promotable/PurchaseTest.php index c797571..7a42909 100644 --- a/tests/tests/Jam/Behavior/Promotable/PurchaseTest.php +++ b/tests/tests/Jam/Behavior/Promotable/PurchaseTest.php @@ -44,4 +44,4 @@ public function test_model_after_load() $purchase = Jam::find('purchase', 1); $this->assertEquals($promo_code->code, $purchase->promo_code_text); } -} \ No newline at end of file +} diff --git a/tests/tests/Model/Collection/Promo/CodeTest.php b/tests/tests/Model/Collection/Promo/CodeTest.php index 12d02eb..c7cd999 100644 --- a/tests/tests/Model/Collection/Promo/CodeTest.php +++ b/tests/tests/Model/Collection/Promo/CodeTest.php @@ -50,4 +50,4 @@ public function test_available() $this->assertEquals($expected_sql, $sql); } -} \ No newline at end of file +} diff --git a/tests/tests/Model/Collection/PromotionTest.php b/tests/tests/Model/Collection/PromotionTest.php index a9b764d..b3440c5 100644 --- a/tests/tests/Model/Collection/PromotionTest.php +++ b/tests/tests/Model/Collection/PromotionTest.php @@ -24,4 +24,4 @@ public function test_not_expired() $this->assertEquals($expected_sql, $sql); } -} \ No newline at end of file +} diff --git a/tests/tests/Model/Purchase/Item/PromotionTest.php b/tests/tests/Model/Purchase/Item/PromotionTest.php index 50abc40..2adc619 100644 --- a/tests/tests/Model/Purchase/Item/PromotionTest.php +++ b/tests/tests/Model/Purchase/Item/PromotionTest.php @@ -46,4 +46,4 @@ public function test_get_price() $this->assertEquals(new Jam_Price(10.25, 'GBP'), $purchase_item->get_price()); $this->assertEquals(new Jam_Price(0, 'GBP'), $purchase_item->get_price()); } -} \ No newline at end of file +}