mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'release/4.7.6.2'
This commit is contained in:
@@ -34,7 +34,7 @@ LOG_CHANNEL=dailytest
|
|||||||
# debug, info, notice, warning, error, critical, alert, emergency
|
# debug, info, notice, warning, error, critical, alert, emergency
|
||||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||||
# nothing will get logged, ever.
|
# nothing will get logged, ever.
|
||||||
APP_LOG_LEVEL=debug
|
APP_LOG_LEVEL=info
|
||||||
|
|
||||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||||
# For other database types, please see the FAQ: http://firefly-iii.readthedocs.io/en/latest/support/faq.html
|
# For other database types, please see the FAQ: http://firefly-iii.readthedocs.io/en/latest/support/faq.html
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# 4.7.6.2
|
||||||
|
- Docker file builds again.
|
||||||
|
- Fix CSS of OAuth2 authorization view.
|
||||||
|
|
||||||
# 4.7.6.1
|
# 4.7.6.1
|
||||||
- An issue where I switched variables from the Docker `.env` file to the normal `.env` file and vice versa -- breaking both.
|
- An issue where I switched variables from the Docker `.env` file to the normal `.env` file and vice versa -- breaking both.
|
||||||
- [Issue 1649](https://github.com/firefly-iii/firefly-iii/issues/1649) 2FA QR code would not show up due to very strict security policy headers
|
- [Issue 1649](https://github.com/firefly-iii/firefly-iii/issues/1649) 2FA QR code would not show up due to very strict security policy headers
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const pkgdef :Spk.PackageDefinition = (
|
|||||||
manifest = (
|
manifest = (
|
||||||
appTitle = (defaultText = "Firefly III"),
|
appTitle = (defaultText = "Firefly III"),
|
||||||
appVersion = 16,
|
appVersion = 16,
|
||||||
appMarketingVersion = (defaultText = "4.7.6.1"),
|
appMarketingVersion = (defaultText = "4.7.6.2"),
|
||||||
|
|
||||||
actions = [
|
actions = [
|
||||||
# Define your "new document" handlers here.
|
# Define your "new document" handlers here.
|
||||||
|
|||||||
@@ -60,10 +60,6 @@ RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/00-curl.conf && ldconfig
|
|||||||
COPY .deploy/docker/supervisord.conf /etc/supervisor/supervisord.conf
|
COPY .deploy/docker/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
RUN mkdir -p /etc/supervisor/conf.d /var/log/supervisor
|
RUN mkdir -p /etc/supervisor/conf.d /var/log/supervisor
|
||||||
|
|
||||||
# Fix the link to curl:
|
|
||||||
RUN rm -rf /usr/local/lib/libcurl.so.4 && ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4
|
|
||||||
|
|
||||||
|
|
||||||
# copy Firefly III supervisor conf file.
|
# copy Firefly III supervisor conf file.
|
||||||
COPY ./.deploy/docker/firefly-iii.conf /etc/supervisor/conf.d/firefly-iii.conf
|
COPY ./.deploy/docker/firefly-iii.conf /etc/supervisor/conf.d/firefly-iii.conf
|
||||||
|
|
||||||
@@ -82,7 +78,6 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
|
|||||||
# Generate locales supported by Firefly III
|
# Generate locales supported by Firefly III
|
||||||
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\n\n" > /etc/locale.gen && locale-gen
|
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\n\n" > /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
|
|
||||||
# copy Apache config to correct spot.
|
# copy Apache config to correct spot.
|
||||||
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
|
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
|
||||||
|
|
||||||
@@ -105,6 +100,9 @@ RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage
|
|||||||
WORKDIR $FIREFLY_PATH
|
WORKDIR $FIREFLY_PATH
|
||||||
ADD . $FIREFLY_PATH
|
ADD . $FIREFLY_PATH
|
||||||
|
|
||||||
|
# Fix the link to curl:
|
||||||
|
RUN rm -rf /usr/local/lib/libcurl.so.4 && ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4
|
||||||
|
|
||||||
# Run composer
|
# Run composer
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER 1
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
||||||
RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
||||||
|
|||||||
@@ -204,10 +204,11 @@ class TransactionFactory
|
|||||||
throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationType));
|
throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationType));
|
||||||
}
|
}
|
||||||
// source must be in this list AND dest must be in this list:
|
// source must be in this list AND dest must be in this list:
|
||||||
$list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE, AccountType::LOAN, AccountType::MORTGAGE];
|
$list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CREDITCARD, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE,
|
||||||
|
AccountType::LOAN, AccountType::MORTGAGE];
|
||||||
if (
|
if (
|
||||||
!\in_array($sourceType, $list, true) &&
|
!\in_array($sourceType, $list, true)
|
||||||
!\in_array($destinationType, $list, true)) {
|
&& !\in_array($destinationType, $list, true)) {
|
||||||
throw new FireflyException(sprintf('At least one of the accounts must be an asset account (%s, %s).', $sourceType, $destinationType));
|
throw new FireflyException(sprintf('At least one of the accounts must be an asset account (%s, %s).', $sourceType, $destinationType));
|
||||||
}
|
}
|
||||||
// either of these must be asset or default account.
|
// either of these must be asset or default account.
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ class FireflyValidator extends Validator
|
|||||||
try {
|
try {
|
||||||
$value = Crypt::decrypt($value);
|
$value = Crypt::decrypt($value);
|
||||||
} catch (DecryptException $e) {
|
} catch (DecryptException $e) {
|
||||||
Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
|
//Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [4.7.6.2] - 2018-09-03
|
||||||
|
### Fixed
|
||||||
|
- Docker file builds again.
|
||||||
|
- Fix CSS of OAuth2 authorization view.
|
||||||
|
|
||||||
## [4.7.6.1] - 2018-09-02
|
## [4.7.6.1] - 2018-09-02
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
507
composer.lock
generated
507
composer.lock
generated
@@ -1022,16 +1022,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v5.6.37",
|
"version": "v5.6.38",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "975e182d42403b0efdf847c05f6bfb99144f95f5"
|
"reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/975e182d42403b0efdf847c05f6bfb99144f95f5",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/38d838bab9434af79e8ab274ae63f52f7ed45d6e",
|
||||||
"reference": "975e182d42403b0efdf847c05f6bfb99144f95f5",
|
"reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1157,7 +1157,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2018-09-02T13:51:42+00:00"
|
"time": "2018-09-04T13:15:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/passport",
|
"name": "laravel/passport",
|
||||||
@@ -3900,33 +3900,34 @@
|
|||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-ide-helper",
|
"name": "barryvdh/laravel-ide-helper",
|
||||||
"version": "v2.4.3",
|
"version": "v2.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
||||||
"reference": "5c304db44fba8e9c4aa0c09739e59f7be7736fdd"
|
"reference": "09db8c9a76711e98c61af0795934fb15955223fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5c304db44fba8e9c4aa0c09739e59f7be7736fdd",
|
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/09db8c9a76711e98c61af0795934fb15955223fb",
|
||||||
"reference": "5c304db44fba8e9c4aa0c09739e59f7be7736fdd",
|
"reference": "09db8c9a76711e98c61af0795934fb15955223fb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"barryvdh/reflection-docblock": "^2.0.4",
|
"barryvdh/reflection-docblock": "^2.0.4",
|
||||||
"illuminate/console": "^5.0,<5.7",
|
"composer/composer": "^1.6",
|
||||||
"illuminate/filesystem": "^5.0,<5.7",
|
"illuminate/console": "^5.5,<5.8",
|
||||||
"illuminate/support": "^5.0,<5.7",
|
"illuminate/filesystem": "^5.5,<5.8",
|
||||||
"php": ">=5.4.0",
|
"illuminate/support": "^5.5,<5.8",
|
||||||
"symfony/class-loader": "^2.3|^3.0"
|
"php": ">=7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/dbal": "~2.3",
|
"doctrine/dbal": "~2.3",
|
||||||
"illuminate/config": "^5.0,<5.7",
|
"illuminate/config": "^5.1,<5.8",
|
||||||
"illuminate/view": "^5.0,<5.7",
|
"illuminate/view": "^5.1,<5.8",
|
||||||
|
"phpro/grumphp": "^0.14",
|
||||||
"phpunit/phpunit": "4.*",
|
"phpunit/phpunit": "4.*",
|
||||||
"scrutinizer/ocular": "~1.1",
|
"scrutinizer/ocular": "~1.1",
|
||||||
"squizlabs/php_codesniffer": "~2.3"
|
"squizlabs/php_codesniffer": "^3"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)"
|
"doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)"
|
||||||
@@ -3934,7 +3935,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.3-dev"
|
"dev-master": "2.5-dev"
|
||||||
},
|
},
|
||||||
"laravel": {
|
"laravel": {
|
||||||
"providers": [
|
"providers": [
|
||||||
@@ -3969,7 +3970,7 @@
|
|||||||
"phpstorm",
|
"phpstorm",
|
||||||
"sublime"
|
"sublime"
|
||||||
],
|
],
|
||||||
"time": "2018-02-08T07:56:07+00:00"
|
"time": "2018-08-31T13:28:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/reflection-docblock",
|
"name": "barryvdh/reflection-docblock",
|
||||||
@@ -4020,6 +4021,309 @@
|
|||||||
],
|
],
|
||||||
"time": "2016-06-13T19:28:20+00:00"
|
"time": "2016-06-13T19:28:20+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "composer/ca-bundle",
|
||||||
|
"version": "1.1.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/ca-bundle.git",
|
||||||
|
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
|
||||||
|
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-openssl": "*",
|
||||||
|
"ext-pcre": "*",
|
||||||
|
"php": "^5.3.2 || ^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
||||||
|
"psr/log": "^1.0",
|
||||||
|
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Composer\\CaBundle\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "http://seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
||||||
|
"keywords": [
|
||||||
|
"cabundle",
|
||||||
|
"cacert",
|
||||||
|
"certificate",
|
||||||
|
"ssl",
|
||||||
|
"tls"
|
||||||
|
],
|
||||||
|
"time": "2018-08-08T08:57:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "composer/composer",
|
||||||
|
"version": "1.7.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/composer.git",
|
||||||
|
"reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/composer/zipball/576aab9b5abb2ed11a1c52353a759363216a4ad2",
|
||||||
|
"reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"composer/ca-bundle": "^1.0",
|
||||||
|
"composer/semver": "^1.0",
|
||||||
|
"composer/spdx-licenses": "^1.2",
|
||||||
|
"composer/xdebug-handler": "^1.1",
|
||||||
|
"justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
|
||||||
|
"php": "^5.3.2 || ^7.0",
|
||||||
|
"psr/log": "^1.0",
|
||||||
|
"seld/jsonlint": "^1.4",
|
||||||
|
"seld/phar-utils": "^1.0",
|
||||||
|
"symfony/console": "^2.7 || ^3.0 || ^4.0",
|
||||||
|
"symfony/filesystem": "^2.7 || ^3.0 || ^4.0",
|
||||||
|
"symfony/finder": "^2.7 || ^3.0 || ^4.0",
|
||||||
|
"symfony/process": "^2.7 || ^3.0 || ^4.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/console": "2.8.38"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
||||||
|
"phpunit/phpunit-mock-objects": "^2.3 || ^3.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
|
||||||
|
"ext-zip": "Enabling the zip extension allows you to unzip archives",
|
||||||
|
"ext-zlib": "Allow gzip compression of HTTP requests"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/composer"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.7-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Composer\\": "src/Composer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nils Adermann",
|
||||||
|
"email": "naderman@naderman.de",
|
||||||
|
"homepage": "http://www.naderman.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "http://seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.",
|
||||||
|
"homepage": "https://getcomposer.org/",
|
||||||
|
"keywords": [
|
||||||
|
"autoload",
|
||||||
|
"dependency",
|
||||||
|
"package"
|
||||||
|
],
|
||||||
|
"time": "2018-08-16T14:57:12+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "composer/semver",
|
||||||
|
"version": "1.4.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/semver.git",
|
||||||
|
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
|
||||||
|
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^5.3.2 || ^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.5 || ^5.0.5",
|
||||||
|
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Composer\\Semver\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nils Adermann",
|
||||||
|
"email": "naderman@naderman.de",
|
||||||
|
"homepage": "http://www.naderman.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "http://seld.be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rob Bast",
|
||||||
|
"email": "rob.bast@gmail.com",
|
||||||
|
"homepage": "http://robbast.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Semver library that offers utilities, version constraint parsing and validation.",
|
||||||
|
"keywords": [
|
||||||
|
"semantic",
|
||||||
|
"semver",
|
||||||
|
"validation",
|
||||||
|
"versioning"
|
||||||
|
],
|
||||||
|
"time": "2016-08-30T16:08:34+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "composer/spdx-licenses",
|
||||||
|
"version": "1.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/spdx-licenses.git",
|
||||||
|
"reference": "cb17687e9f936acd7e7245ad3890f953770dec1b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/cb17687e9f936acd7e7245ad3890f953770dec1b",
|
||||||
|
"reference": "cb17687e9f936acd7e7245ad3890f953770dec1b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^5.3.2 || ^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
||||||
|
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Composer\\Spdx\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nils Adermann",
|
||||||
|
"email": "naderman@naderman.de",
|
||||||
|
"homepage": "http://www.naderman.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "http://seld.be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rob Bast",
|
||||||
|
"email": "rob.bast@gmail.com",
|
||||||
|
"homepage": "http://robbast.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "SPDX licenses list and validation library.",
|
||||||
|
"keywords": [
|
||||||
|
"license",
|
||||||
|
"spdx",
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
|
"time": "2018-04-30T10:33:04+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "composer/xdebug-handler",
|
||||||
|
"version": "1.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/xdebug-handler.git",
|
||||||
|
"reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c",
|
||||||
|
"reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^5.3.2 || ^7.0",
|
||||||
|
"psr/log": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Composer\\XdebugHandler\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "John Stevenson",
|
||||||
|
"email": "john-stevenson@blueyonder.co.uk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Restarts a process without xdebug.",
|
||||||
|
"keywords": [
|
||||||
|
"Xdebug",
|
||||||
|
"performance"
|
||||||
|
],
|
||||||
|
"time": "2018-08-31T19:07:57+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -4281,6 +4585,72 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-02-24T18:55:28+00:00"
|
"time": "2018-02-24T18:55:28+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "justinrainbow/json-schema",
|
||||||
|
"version": "5.2.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/justinrainbow/json-schema.git",
|
||||||
|
"reference": "8560d4314577199ba51bf2032f02cd1315587c23"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/8560d4314577199ba51bf2032f02cd1315587c23",
|
||||||
|
"reference": "8560d4314577199ba51bf2032f02cd1315587c23",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.1",
|
||||||
|
"json-schema/json-schema-test-suite": "1.2.0",
|
||||||
|
"phpunit/phpunit": "^4.8.35"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/validate-json"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "5.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"JsonSchema\\": "src/JsonSchema/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Bruno Prieto Reis",
|
||||||
|
"email": "bruno.p.reis@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Justin Rainbow",
|
||||||
|
"email": "justin.rainbow@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Igor Wiedler",
|
||||||
|
"email": "igor@wiedler.ch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Robert Schönthal",
|
||||||
|
"email": "seroscho@googlemail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library to validate a json schema.",
|
||||||
|
"homepage": "https://github.com/justinrainbow/json-schema",
|
||||||
|
"keywords": [
|
||||||
|
"json",
|
||||||
|
"schema"
|
||||||
|
],
|
||||||
|
"time": "2018-02-14T22:26:30+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "mockery/mockery",
|
"name": "mockery/mockery",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -5853,42 +6223,33 @@
|
|||||||
"time": "2016-10-03T07:35:21+00:00"
|
"time": "2016-10-03T07:35:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/class-loader",
|
"name": "seld/jsonlint",
|
||||||
"version": "v3.4.15",
|
"version": "1.7.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/class-loader.git",
|
"url": "https://github.com/Seldaek/jsonlint.git",
|
||||||
"reference": "31db283fc86d3143e7ff87e922177b457d909c30"
|
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/class-loader/zipball/31db283fc86d3143e7ff87e922177b457d909c30",
|
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||||
"reference": "31db283fc86d3143e7ff87e922177b457d909c30",
|
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.5.9|>=7.0.8"
|
"php": "^5.3 || ^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/finder": "~2.8|~3.0|~4.0",
|
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
|
||||||
"symfony/polyfill-apcu": "~1.1"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"symfony/polyfill-apcu": "For using ApcClassLoader on HHVM"
|
|
||||||
},
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/jsonlint"
|
||||||
|
],
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.4-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\ClassLoader\\": ""
|
"Seld\\JsonLint\\": "src/Seld/JsonLint/"
|
||||||
},
|
}
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
@@ -5896,17 +6257,63 @@
|
|||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Fabien Potencier",
|
"name": "Jordi Boggiano",
|
||||||
"email": "fabien@symfony.com"
|
"email": "j.boggiano@seld.be",
|
||||||
},
|
"homepage": "http://seld.be"
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony ClassLoader Component",
|
"description": "JSON Linter",
|
||||||
"homepage": "https://symfony.com",
|
"keywords": [
|
||||||
"time": "2018-07-26T11:19:56+00:00"
|
"json",
|
||||||
|
"linter",
|
||||||
|
"parser",
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
|
"time": "2018-01-24T12:46:19+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "seld/phar-utils",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Seldaek/phar-utils.git",
|
||||||
|
"reference": "7009b5139491975ef6486545a39f3e6dad5ac30a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a",
|
||||||
|
"reference": "7009b5139491975ef6486545a39f3e6dad5ac30a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Seld\\PharUtils\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHAR file format utilities, for when PHP phars you up",
|
||||||
|
"keywords": [
|
||||||
|
"phra"
|
||||||
|
],
|
||||||
|
"time": "2015-10-13T18:44:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/config",
|
"name": "symfony/config",
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ return [
|
|||||||
'is_demo_site' => false,
|
'is_demo_site' => false,
|
||||||
],
|
],
|
||||||
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
|
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
|
||||||
'version' => '4.7.6.1',
|
'version' => '4.7.6.2',
|
||||||
'api_version' => '0.7',
|
'api_version' => '0.7',
|
||||||
'db_version' => 4,
|
'db_version' => 4,
|
||||||
'maxUploadSize' => 15242880,
|
'maxUploadSize' => 15242880,
|
||||||
@@ -238,13 +238,13 @@ return [
|
|||||||
'es_ES' => ['name_locale' => 'Español', 'name_english' => 'Spanish'],
|
'es_ES' => ['name_locale' => 'Español', 'name_english' => 'Spanish'],
|
||||||
'de_DE' => ['name_locale' => 'Deutsch', 'name_english' => 'German'],
|
'de_DE' => ['name_locale' => 'Deutsch', 'name_english' => 'German'],
|
||||||
'fr_FR' => ['name_locale' => 'Français', 'name_english' => 'French'],
|
'fr_FR' => ['name_locale' => 'Français', 'name_english' => 'French'],
|
||||||
'id_ID' => ['name_locale' => 'Bahasa Indonesia', 'name_english' => 'Indonesian'],
|
//'id_ID' => ['name_locale' => 'Bahasa Indonesia', 'name_english' => 'Indonesian'],
|
||||||
'it_IT' => ['name_locale' => 'Italiano', 'name_english' => 'Italian'],
|
'it_IT' => ['name_locale' => 'Italiano', 'name_english' => 'Italian'],
|
||||||
'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch'],
|
'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch'],
|
||||||
'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish '],
|
'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish '],
|
||||||
'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)'],
|
//'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)'],
|
||||||
'ru_RU' => ['name_locale' => 'Русский', 'name_english' => 'Russian'],
|
'ru_RU' => ['name_locale' => 'Русский', 'name_english' => 'Russian'],
|
||||||
'tr_TR' => ['name_locale' => 'Türkçe', 'name_english' => 'Turkish'],
|
//'tr_TR' => ['name_locale' => 'Türkçe', 'name_english' => 'Turkish'],
|
||||||
],
|
],
|
||||||
'transactionTypesByWhat' => [
|
'transactionTypesByWhat' => [
|
||||||
'expenses' => ['Withdrawal'],
|
'expenses' => ['Withdrawal'],
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ declare(strict_types=1);
|
|||||||
return [
|
return [
|
||||||
'no_demo_text' => 'Leider gibt es keine zusätzlichen Demo-Erklärungen für <abbr title=":route">diese Seite</abbr>.',
|
'no_demo_text' => 'Leider gibt es keine zusätzlichen Demo-Erklärungen für <abbr title=":route">diese Seite</abbr>.',
|
||||||
'see_help_icon' => 'Vielleicht erfahren Sie mehr über das <i class="fa fa-question-circle"></i>-Icon in der oberen rechten Ecke.',
|
'see_help_icon' => 'Vielleicht erfahren Sie mehr über das <i class="fa fa-question-circle"></i>-Icon in der oberen rechten Ecke.',
|
||||||
'index' => 'Willkommen bei <strong>Firefly III</strong>! Auf dieser Seite erhalten Sie einen schnellen Überblick über Ihre Finanzen. Für einen schnellen Start empfehlen wir einen Besuch bei den → <a href=":asset">Bestandskonten</a>, den <a href=":budgets">Kostenrahmen</a> oder den <a href=":reports">Berichten</a>. Oder sehen Sie sich einfach um und schauen wo Sie landen.',
|
'index' => 'Willkommen bei <strong>Firefly III</strong>! Auf dieser Seite erhalten Sie einen schnellen Überblick über Ihre Finanzen. Für einen schnellen Start empfehlen wir einen Besuch bei den → <a href=":asset">Bestandskoten</a>, den <a href=":budgets">Budgets</a> oder den <a href=":reports">Berichten</a>. Oder sehen Sie sich einfach um und schauen, wo Sie landen.',
|
||||||
'accounts-index' => 'Konten sind Ihre persönlichen Bankkonten, Kreditkarten, Bar-Kassen, usw.. Kreditoren (Zahlungsempfänger) sind Konten, die Geld von Ihnen erhalten, z. B. der Supermarkt, das Kino oder der Vermieter. Debitoren (Einnahmequellen) sind Konten von denen Sie Geld erhalten, z. B. Ihr Arbeitgeber, die Familienkassen oder andere Einkommensquellen. Auf dieser Seite können Sie diese bearbeiten oder entfernen.',
|
'accounts-index' => 'Konten sind Ihre persönlichen Bankkonten, Kreditkarten, Geldbörsen usw. Kreditoren (Zahlungsempfänger) sind Konten, die Geld von Ihnen erhalten, z. B. der Supermarkt, das Kino oder der Vermieter. Debitoren (Einnahmequellen) sind Konten, von denen Sie Geld erhalten, z. B. Ihr Arbeitgeber, die Familienkassen oder andere Einkommensquellen. Auf dieser Seite können Sie diese bearbeiten oder entfernen.',
|
||||||
'budgets-index' => 'Hier finden Sie einen Überblick über Ihre Budgets. Die obere Leiste zeigt den zur Verfügung stehenden Betrag. Dieser kann angepasst werden, indem Sie auf den Betrag auf der rechten Seite klicken. Bisherige Ausgaben werden in der darunter liegenden Leiste angezeigt. Darunter finden Sie die von Ihnen angelegten Budgets sowie die bereits darauf verbuchten Ausgaben.',
|
'budgets-index' => 'Hier finden Sie einen Überblick über Ihre Budgets. Die obere Leiste zeigt den zur Verfügung stehenden Betrag. Dieser kann angepasst werden, indem Sie auf den Betrag auf der rechten Seite klicken. Bisherige Ausgaben werden in der darunter liegenden Leiste angezeigt. Darunter finden Sie die von Ihnen angelegten Budgets sowie die bereits darauf verbuchten Ausgaben.',
|
||||||
'reports-index-start' => 'Firefly III unterstützt eine Reihe von Berichten. Weitere Informationen dazu erhalten Sie über das <i class="fa fa-question-circle"></i>-Symbol in der oberen rechten Ecke.',
|
'reports-index-start' => 'Firefly III unterstützt eine Reihe von Berichten. Weitere Informationen dazu erhalten Sie über das <i class="fa fa-question-circle"></i>-Symbol in der oberen rechten Ecke.',
|
||||||
'reports-index-examples' => 'Sehen Sie sich auch diese Beispiele an: <a href=":one">eine monatliche Finanzübersicht</a>, <a href=":two">eine jährliche Finanzübersicht</a> und <a href=":three">eine Haushaltsübersicht</a>.',
|
'reports-index-examples' => 'Sehen Sie sich auch diese Beispiele an: <a href=":one">eine monatliche Finanzübersicht</a>, <a href=":two">eine jährliche Finanzübersicht</a> und <a href=":three">eine Haushaltsübersicht</a>.',
|
||||||
|
|||||||
@@ -49,20 +49,20 @@ return [
|
|||||||
'new_withdrawal' => 'Neue Ausgabe',
|
'new_withdrawal' => 'Neue Ausgabe',
|
||||||
'create_new_transaction' => 'Neue Buchung erstellen',
|
'create_new_transaction' => 'Neue Buchung erstellen',
|
||||||
'go_to_asset_accounts' => 'Bestandskonten anzeigen',
|
'go_to_asset_accounts' => 'Bestandskonten anzeigen',
|
||||||
'go_to_budgets' => 'Kostenrahmen anzeigen',
|
'go_to_budgets' => 'Budgets anzeigen',
|
||||||
'go_to_categories' => 'Kategorien anzeigen',
|
'go_to_categories' => 'Kategorien anzeigen',
|
||||||
'go_to_bills' => 'Rechnungen anzeigen',
|
'go_to_bills' => 'Rechnungen anzeigen',
|
||||||
'go_to_expense_accounts' => 'Aufwandskonten anzeigen',
|
'go_to_expense_accounts' => 'Kreditoren (Ausgabenkonten) anzeigen',
|
||||||
'go_to_revenue_accounts' => 'Erlöskonten anzeigen',
|
'go_to_revenue_accounts' => 'Erlöskonten anzeigen',
|
||||||
'go_to_piggies' => 'Sparschweine anzeigen',
|
'go_to_piggies' => 'Sparschweine anzeigen',
|
||||||
'new_deposit' => 'Neue Einnahme',
|
'new_deposit' => 'Neue Einnahme',
|
||||||
'new_transfer' => 'Neue Umbuchung',
|
'new_transfer' => 'Neue Umbuchung',
|
||||||
'new_transfers' => 'Neue Umbuchung',
|
'new_transfers' => 'Neue Umbuchung',
|
||||||
'new_asset_account' => 'Neues Bestandskonto',
|
'new_asset_account' => 'Neues Bestandskonto',
|
||||||
'new_expense_account' => 'Neuer Debitor (Geldausgang)',
|
'new_expense_account' => 'Neuer Kreditor (Ausgabenkonto)',
|
||||||
'new_revenue_account' => 'Neuer Kreditor (Geldeingang)',
|
'new_revenue_account' => 'Neuer Kreditor (Geldeingang)',
|
||||||
'new_liabilities_account' => 'Neue Verbindlichkeit',
|
'new_liabilities_account' => 'Neue Verbindlichkeit',
|
||||||
'new_budget' => 'Neuer Kostenrahmen',
|
'new_budget' => 'Neues Budget',
|
||||||
'new_bill' => 'Neue Rechnung',
|
'new_bill' => 'Neue Rechnung',
|
||||||
'block_account_logout' => 'Sie wurden ausgeloggt. Blockierte Benutzerkonten können diese Seite nicht nutzen. Haben Sie sich mit einer gültigen E-Mail Adresse registriert?',
|
'block_account_logout' => 'Sie wurden ausgeloggt. Blockierte Benutzerkonten können diese Seite nicht nutzen. Haben Sie sich mit einer gültigen E-Mail Adresse registriert?',
|
||||||
'flash_success' => 'Geschafft!',
|
'flash_success' => 'Geschafft!',
|
||||||
@@ -90,7 +90,7 @@ return [
|
|||||||
'warning_much_data' => ':days Tage Daten können eine Weile zu laden benötigen.',
|
'warning_much_data' => ':days Tage Daten können eine Weile zu laden benötigen.',
|
||||||
'registered' => 'Sie haben sich erfolgreich registriert!',
|
'registered' => 'Sie haben sich erfolgreich registriert!',
|
||||||
'Default asset account' => 'Standard-Bestandskonto',
|
'Default asset account' => 'Standard-Bestandskonto',
|
||||||
'no_budget_pointer' => 'Sie scheinen noch keine Kostenrahmen festgelegt zu haben. Sie sollten einige davon auf der Seite <a href=":link">Kostenrahmen</a> anlegen. Kostenrahmen können Ihnen dabei helfen, den Überblick über die Ausgaben zu behalten.',
|
'no_budget_pointer' => 'Sie scheinen noch keine Budgets festgelegt zu haben. Sie sollten einige davon auf der Seite <a href=":link">Budgets</a> anlegen. Budgets können Ihnen dabei helfen, den Überblick über die Ausgaben zu behalten.',
|
||||||
'Savings account' => 'Sparkonto',
|
'Savings account' => 'Sparkonto',
|
||||||
'Credit card' => 'Kreditkarte',
|
'Credit card' => 'Kreditkarte',
|
||||||
'source_accounts' => 'Herkunftskonto',
|
'source_accounts' => 'Herkunftskonto',
|
||||||
@@ -102,21 +102,21 @@ return [
|
|||||||
'intro_boxes_after_refresh' => 'Die Einführungsfelder werden wieder angezeigt, wenn Sie die Seite aktualisieren.',
|
'intro_boxes_after_refresh' => 'Die Einführungsfelder werden wieder angezeigt, wenn Sie die Seite aktualisieren.',
|
||||||
'show_all_no_filter' => 'Alle Buchungen anzeigen, ohne diese nach Datum zu gruppieren.',
|
'show_all_no_filter' => 'Alle Buchungen anzeigen, ohne diese nach Datum zu gruppieren.',
|
||||||
'expenses_by_category' => 'Ausgaben nach Kategorie',
|
'expenses_by_category' => 'Ausgaben nach Kategorie',
|
||||||
'expenses_by_budget' => 'Ausgaben nach Kostenrahmen',
|
'expenses_by_budget' => 'Ausgaben nach Budget',
|
||||||
'income_by_category' => 'Einkommen nach Kategorie',
|
'income_by_category' => 'Einkommen nach Kategorie',
|
||||||
'expenses_by_asset_account' => 'Aufwendungen nach Bestandskonto',
|
'expenses_by_asset_account' => 'Aufwendungen nach Bestandskonto',
|
||||||
'expenses_by_expense_account' => 'Aufwendungen nach Aufwandskonto',
|
'expenses_by_expense_account' => 'Aufwendungen nach Kreditor (Ausgabenkonto)',
|
||||||
'cannot_redirect_to_account' => 'Entschuldigung. Firefly III kann Sie nicht zur richtigen Seite weiterleiten.',
|
'cannot_redirect_to_account' => 'Entschuldigung. Firefly III kann Sie nicht zur richtigen Seite weiterleiten.',
|
||||||
'sum_of_expenses' => 'Summe von Ausgaben',
|
'sum_of_expenses' => 'Summe von Ausgaben',
|
||||||
'sum_of_income' => 'Summe von Einnahmen',
|
'sum_of_income' => 'Summe von Einnahmen',
|
||||||
'spent_in_specific_budget' => 'Ausgaben im Kostenrahmen „:budget”',
|
'spent_in_specific_budget' => 'Ausgaben im Budget „:budget”',
|
||||||
'sum_of_expenses_in_budget' => 'Gesamtausgaben im Kostenrahmen „:budget”',
|
'sum_of_expenses_in_budget' => 'Gesamtausgaben im Budget „:budget”',
|
||||||
'left_in_budget_limit' => 'Verbleibend zum Ausgeben, entsprechend der Kostenplanung',
|
'left_in_budget_limit' => 'Verbleibend zum Ausgeben, entsprechend der Kostenplanung',
|
||||||
'current_period' => 'Aktueller Zeitraum',
|
'current_period' => 'Aktueller Zeitraum',
|
||||||
'show_the_current_period_and_overview' => 'Zeigen Sie den aktuellen Zeitraum und die Übersicht',
|
'show_the_current_period_and_overview' => 'Zeigen Sie den aktuellen Zeitraum und die Übersicht',
|
||||||
'pref_languages_locale' => 'Damit eine andere Sprache als Englisch richtig funktioniert muss Ihr Betriebssystem mit den korrekten Gebietsschema-Informationen ausgestattet werden. Wenn diese nicht vorhanden sind, können die Währungsdaten, Termine und Mengen falsch formatiert.',
|
'pref_languages_locale' => 'Damit eine andere Sprache als Englisch richtig funktioniert muss Ihr Betriebssystem mit den korrekten Gebietsschema-Informationen ausgestattet werden. Wenn diese nicht vorhanden sind, können die Währungsdaten, Termine und Mengen falsch formatiert.',
|
||||||
'budget_in_period' => 'Alle Buchungen für Kostenrahmen „:name” zwischen :start und :end',
|
'budget_in_period' => 'Alle Buchungen für Budget „:name” zwischen :start und :end',
|
||||||
'chart_budget_in_period' => 'Diagramm für alle Buchungen im Kostenrahmen „:name” zwischen :start und :end',
|
'chart_budget_in_period' => 'Diagramm für alle Buchungen im Budget „:name” zwischen :start und :end',
|
||||||
'chart_account_in_period' => 'Diagramm für alle Transaktionen des Kontos „:name” zwischen :start und :end',
|
'chart_account_in_period' => 'Diagramm für alle Transaktionen des Kontos „:name” zwischen :start und :end',
|
||||||
'chart_category_in_period' => 'Diagramm für alle Buchungen der Kategorie „:name” zwischen :start und :end',
|
'chart_category_in_period' => 'Diagramm für alle Buchungen der Kategorie „:name” zwischen :start und :end',
|
||||||
'chart_category_all' => 'Diagramm für alle Buchungen der Kategorie „:name”',
|
'chart_category_all' => 'Diagramm für alle Buchungen der Kategorie „:name”',
|
||||||
@@ -133,8 +133,8 @@ return [
|
|||||||
'intro_skip_label' => 'Überspringen',
|
'intro_skip_label' => 'Überspringen',
|
||||||
'intro_done_label' => 'Erledigt',
|
'intro_done_label' => 'Erledigt',
|
||||||
'between_dates_breadcrumb' => 'Zwischen :start und :end',
|
'between_dates_breadcrumb' => 'Zwischen :start und :end',
|
||||||
'all_journals_without_budget' => 'Alle Buchungen ohne Kostenrahmen',
|
'all_journals_without_budget' => 'Alle Transaktionen ohne Budget',
|
||||||
'journals_without_budget' => 'Buchungen ohne Kostenrahmen',
|
'journals_without_budget' => 'Transaktionen ohne Budget',
|
||||||
'all_journals_without_category' => 'Alle Buchungen ohne Kategorie',
|
'all_journals_without_category' => 'Alle Buchungen ohne Kategorie',
|
||||||
'journals_without_category' => 'Buchungen ohne Kategorie',
|
'journals_without_category' => 'Buchungen ohne Kategorie',
|
||||||
'all_journals_for_account' => 'Alle Buchungen für Konto „:name”',
|
'all_journals_for_account' => 'Alle Buchungen für Konto „:name”',
|
||||||
@@ -153,7 +153,7 @@ return [
|
|||||||
'title_transfer_between' => 'Alle Umbuchungen zwischen :start und :end',
|
'title_transfer_between' => 'Alle Umbuchungen zwischen :start und :end',
|
||||||
'all_journals_for_category' => 'Alle Buchungen für Kategorie „:name”',
|
'all_journals_for_category' => 'Alle Buchungen für Kategorie „:name”',
|
||||||
'all_journals_for_budget' => 'Alle Buchungen im Kostenrahmen „:name”',
|
'all_journals_for_budget' => 'Alle Buchungen im Kostenrahmen „:name”',
|
||||||
'chart_all_journals_for_budget' => 'Diagramm für alle Buchungen im Kostenrahmen „:name”',
|
'chart_all_journals_for_budget' => 'Diagramm für alle Buchungen im Budget „:name”',
|
||||||
'journals_in_period_for_category' => 'Alle Buchungen für Kategorie „:name” zwischen :start und :end',
|
'journals_in_period_for_category' => 'Alle Buchungen für Kategorie „:name” zwischen :start und :end',
|
||||||
'journals_in_period_for_tag' => 'Alle Buchungen für das Schlagwort „:tag” zwischen :start und :end',
|
'journals_in_period_for_tag' => 'Alle Buchungen für das Schlagwort „:tag” zwischen :start und :end',
|
||||||
'not_available_demo_user' => 'Die Funktionen, auf welche sie zugreifen wollen, steht Demo-Benutzer nicht zur Verfügung.',
|
'not_available_demo_user' => 'Die Funktionen, auf welche sie zugreifen wollen, steht Demo-Benutzer nicht zur Verfügung.',
|
||||||
@@ -353,8 +353,8 @@ return [
|
|||||||
'rule_trigger_description_contains' => 'Beschreibung enthält ":trigger_value"',
|
'rule_trigger_description_contains' => 'Beschreibung enthält ":trigger_value"',
|
||||||
'rule_trigger_description_is_choice' => 'Beschreibung ist..',
|
'rule_trigger_description_is_choice' => 'Beschreibung ist..',
|
||||||
'rule_trigger_description_is' => 'Beschreibung ist ":trigger_value"',
|
'rule_trigger_description_is' => 'Beschreibung ist ":trigger_value"',
|
||||||
'rule_trigger_budget_is_choice' => 'Kostenrahmen ist …',
|
'rule_trigger_budget_is_choice' => 'Budget ist..',
|
||||||
'rule_trigger_budget_is' => 'Kostenrahmen ist „:trigger_value”',
|
'rule_trigger_budget_is' => 'Budget ist ":trigger_value"',
|
||||||
'rule_trigger_tag_is_choice' => '(Ein) Schlagwort ist …',
|
'rule_trigger_tag_is_choice' => '(Ein) Schlagwort ist …',
|
||||||
'rule_trigger_tag_is' => 'Ein Schlagwort ist ":trigger_value"',
|
'rule_trigger_tag_is' => 'Ein Schlagwort ist ":trigger_value"',
|
||||||
'rule_trigger_currency_is_choice' => 'Buchungswährung ist …',
|
'rule_trigger_currency_is_choice' => 'Buchungswährung ist …',
|
||||||
@@ -367,10 +367,10 @@ return [
|
|||||||
'rule_trigger_has_no_category' => 'Transaktion ohne Kategorie',
|
'rule_trigger_has_no_category' => 'Transaktion ohne Kategorie',
|
||||||
'rule_trigger_has_any_category_choice' => 'Hat eine (beliebige) Kategorie',
|
'rule_trigger_has_any_category_choice' => 'Hat eine (beliebige) Kategorie',
|
||||||
'rule_trigger_has_any_category' => 'Transaktion hat eine (beliebige) Kategorie',
|
'rule_trigger_has_any_category' => 'Transaktion hat eine (beliebige) Kategorie',
|
||||||
'rule_trigger_has_no_budget_choice' => 'Enthält keinen Kostenrahmen',
|
'rule_trigger_has_no_budget_choice' => 'Hat kein Budget',
|
||||||
'rule_trigger_has_no_budget' => 'Buchung ohne Kostenrahmen',
|
'rule_trigger_has_no_budget' => 'Buchung ohne Budget',
|
||||||
'rule_trigger_has_any_budget_choice' => 'Enthält einen (beliebigen) Kostenrahmen',
|
'rule_trigger_has_any_budget_choice' => 'Hat ein (beliebiges) Budget',
|
||||||
'rule_trigger_has_any_budget' => 'Buchung enthält einen (beliebigen) Kostenrahmen',
|
'rule_trigger_has_any_budget' => 'Transaktion hat ein (beliebiges) Budget',
|
||||||
'rule_trigger_has_no_tag_choice' => 'Enthält keine Schlagwörter',
|
'rule_trigger_has_no_tag_choice' => 'Enthält keine Schlagwörter',
|
||||||
'rule_trigger_has_no_tag' => 'Transaktion enthält keine Schlagwörter',
|
'rule_trigger_has_no_tag' => 'Transaktion enthält keine Schlagwörter',
|
||||||
'rule_trigger_has_any_tag_choice' => 'Enthält einen oder mehrere (beliebige) Schlagwörter',
|
'rule_trigger_has_any_tag_choice' => 'Enthält einen oder mehrere (beliebige) Schlagwörter',
|
||||||
@@ -389,8 +389,8 @@ return [
|
|||||||
'rule_trigger_notes_end' => 'Notizen mit „:trigger_value” beenden',
|
'rule_trigger_notes_end' => 'Notizen mit „:trigger_value” beenden',
|
||||||
'rule_action_set_category' => 'Kategorie zu ":action_value" festlegen',
|
'rule_action_set_category' => 'Kategorie zu ":action_value" festlegen',
|
||||||
'rule_action_clear_category' => 'Bereinige Kategorie',
|
'rule_action_clear_category' => 'Bereinige Kategorie',
|
||||||
'rule_action_set_budget' => 'Kostenrahmen zu „:action_value” festlegen',
|
'rule_action_set_budget' => 'Budget zu ":action_value" festlegen',
|
||||||
'rule_action_clear_budget' => 'Kostenrahmen leeren',
|
'rule_action_clear_budget' => 'Lösche Budget',
|
||||||
'rule_action_add_tag' => 'Schlagwort „:action_value” hinzufügen',
|
'rule_action_add_tag' => 'Schlagwort „:action_value” hinzufügen',
|
||||||
'rule_action_remove_tag' => 'Schlagwort „:action_value” entfernen',
|
'rule_action_remove_tag' => 'Schlagwort „:action_value” entfernen',
|
||||||
'rule_action_remove_all_tags' => 'Alle Schlüsselwörter entfernen',
|
'rule_action_remove_all_tags' => 'Alle Schlüsselwörter entfernen',
|
||||||
@@ -399,8 +399,8 @@ return [
|
|||||||
'rule_action_prepend_description' => 'Beschreibungen mit ":action_value" voranstellen',
|
'rule_action_prepend_description' => 'Beschreibungen mit ":action_value" voranstellen',
|
||||||
'rule_action_set_category_choice' => 'Kategorie festlegen..',
|
'rule_action_set_category_choice' => 'Kategorie festlegen..',
|
||||||
'rule_action_clear_category_choice' => 'Bereinige jede Kategorie',
|
'rule_action_clear_category_choice' => 'Bereinige jede Kategorie',
|
||||||
'rule_action_set_budget_choice' => 'Kostenrahmen festlegen …',
|
'rule_action_set_budget_choice' => 'Budget festlegen..',
|
||||||
'rule_action_clear_budget_choice' => 'Alle Kostenrahmen leeren',
|
'rule_action_clear_budget_choice' => 'Lösche jedes Budget',
|
||||||
'rule_action_add_tag_choice' => 'Schlagwort hinzufügen …',
|
'rule_action_add_tag_choice' => 'Schlagwort hinzufügen …',
|
||||||
'rule_action_remove_tag_choice' => 'Schlagwort entfernen …',
|
'rule_action_remove_tag_choice' => 'Schlagwort entfernen …',
|
||||||
'rule_action_remove_all_tags_choice' => 'Alle Schlagwörter entfernen',
|
'rule_action_remove_all_tags_choice' => 'Alle Schlagwörter entfernen',
|
||||||
@@ -450,7 +450,7 @@ return [
|
|||||||
'pref_home_screen_accounts' => 'Konten auf dem Startbildschirm',
|
'pref_home_screen_accounts' => 'Konten auf dem Startbildschirm',
|
||||||
'pref_home_screen_accounts_help' => 'Welche Konten sollen auf dem Startbildschirm angezeigt werden?',
|
'pref_home_screen_accounts_help' => 'Welche Konten sollen auf dem Startbildschirm angezeigt werden?',
|
||||||
'pref_view_range' => 'Sichtbare Zeiträume',
|
'pref_view_range' => 'Sichtbare Zeiträume',
|
||||||
'pref_view_range_help' => 'Einige Diagramme werden automatisch in Abschnitte aufgeteilt. Ihre Kostenrahmen werden ebenfalls in Abschnitte unterteilt. Welchen Zeitraum bevorzugen Sie?',
|
'pref_view_range_help' => 'Einige Diagramme werden automatisch in Abschnitte aufgeteilt. Ihre Budgets werden ebenfalls in Abschnitte unterteilt. Welchen Zeitraum bevorzugen Sie?',
|
||||||
'pref_1D' => 'Ein Tag',
|
'pref_1D' => 'Ein Tag',
|
||||||
'pref_1W' => 'Eine Woche',
|
'pref_1W' => 'Eine Woche',
|
||||||
'pref_1M' => 'Ein Monat',
|
'pref_1M' => 'Ein Monat',
|
||||||
@@ -480,8 +480,7 @@ return [
|
|||||||
'preferences_security' => 'Sicherheit',
|
'preferences_security' => 'Sicherheit',
|
||||||
'preferences_layout' => 'Anordnung',
|
'preferences_layout' => 'Anordnung',
|
||||||
'pref_home_show_deposits' => 'Einnahmen auf dem Startbildschirm anzeigen',
|
'pref_home_show_deposits' => 'Einnahmen auf dem Startbildschirm anzeigen',
|
||||||
'pref_home_show_deposits_info' => 'Der Startbildschirm zeigt schon Ihre Ausgabenkonten an.
|
'pref_home_show_deposits_info' => 'Der Startbildschirm zeigt schon Ihre Aufwandskonten an. Sollen zusätzlich Ihre Erlöskonten angezeigt werden?',
|
||||||
Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|
||||||
'pref_home_do_show_deposits' => 'Ja, zeige sie an',
|
'pref_home_do_show_deposits' => 'Ja, zeige sie an',
|
||||||
'successful_count' => 'davon :count erfolgreich',
|
'successful_count' => 'davon :count erfolgreich',
|
||||||
'list_page_size_title' => 'Einträge pro Seite',
|
'list_page_size_title' => 'Einträge pro Seite',
|
||||||
@@ -583,7 +582,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'convert_Transfer_to_withdrawal' => 'Konvertieren Sie diese Umbuchung in eine Ausgabe',
|
'convert_Transfer_to_withdrawal' => 'Konvertieren Sie diese Umbuchung in eine Ausgabe',
|
||||||
'convert_please_set_revenue_source' => 'Bitte ein Eingangskonto wählen, woher das Geld kommen wird.',
|
'convert_please_set_revenue_source' => 'Bitte ein Eingangskonto wählen, woher das Geld kommen wird.',
|
||||||
'convert_please_set_asset_destination' => 'Bitte wählen Sie das Bestandskonto, auf das das Geld überwiesen werden soll.',
|
'convert_please_set_asset_destination' => 'Bitte wählen Sie das Bestandskonto, auf das das Geld überwiesen werden soll.',
|
||||||
'convert_please_set_expense_destination' => 'Bitte wählen Sie ein Spesenkonto wo das Geld hingehen wird.',
|
'convert_please_set_expense_destination' => 'Bitte wählen Sie einen Kreditor (Ausgabenkonto), an den das Geld gehen soll.',
|
||||||
'convert_please_set_asset_source' => 'Bitte das Bestandskonto wählen, von dem das Geld kommt.',
|
'convert_please_set_asset_source' => 'Bitte das Bestandskonto wählen, von dem das Geld kommt.',
|
||||||
'convert_explanation_withdrawal_deposit' => 'Falls Sie diese Ausgabe in eine Einlage konvertieren, wird :amount in <a href=":sourceRoute">sourceName</a> eingezahlt statt davon abgezogen zu werden.',
|
'convert_explanation_withdrawal_deposit' => 'Falls Sie diese Ausgabe in eine Einlage konvertieren, wird :amount in <a href=":sourceRoute">sourceName</a> eingezahlt statt davon abgezogen zu werden.',
|
||||||
'convert_explanation_withdrawal_transfer' => 'Falls Sie diese Ausgabe in eine Umbuchung konvertieren, wird :amount von <a href=":sourceRoute">:sourceName</a> auf ein neues Bestandskonto überwiesen, statt auf das Bestandskonto <a href=":destinationRoute">:destinationName</a>.',
|
'convert_explanation_withdrawal_transfer' => 'Falls Sie diese Ausgabe in eine Umbuchung konvertieren, wird :amount von <a href=":sourceRoute">:sourceName</a> auf ein neues Bestandskonto überwiesen, statt auf das Bestandskonto <a href=":destinationRoute">:destinationName</a>.',
|
||||||
@@ -602,7 +601,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'create_new_deposit' => 'Erstelle ein neues Einkommen',
|
'create_new_deposit' => 'Erstelle ein neues Einkommen',
|
||||||
'create_new_transfer' => 'Eine neue Umbuchung erstellen',
|
'create_new_transfer' => 'Eine neue Umbuchung erstellen',
|
||||||
'create_new_asset' => 'Neues Bestandskonto erstellen',
|
'create_new_asset' => 'Neues Bestandskonto erstellen',
|
||||||
'create_new_expense' => 'Neuen Debitor (Ausgabe) erstellen',
|
'create_new_expense' => 'Neuen Kreditor (Ausgabenkonto) erstellen',
|
||||||
'create_new_revenue' => 'Neuen Schuldner erstellen',
|
'create_new_revenue' => 'Neuen Schuldner erstellen',
|
||||||
'create_new_piggy_bank' => 'Ein neues Sparschwein erstellen',
|
'create_new_piggy_bank' => 'Ein neues Sparschwein erstellen',
|
||||||
'create_new_bill' => 'Eine neue Rechnung erstellen',
|
'create_new_bill' => 'Eine neue Rechnung erstellen',
|
||||||
@@ -628,22 +627,22 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'options' => 'Einstellungen',
|
'options' => 'Einstellungen',
|
||||||
|
|
||||||
// budgets:
|
// budgets:
|
||||||
'create_new_budget' => 'Neuen Kostenrahmen erstellen',
|
'create_new_budget' => 'Ein neues Budget erstellen',
|
||||||
'store_new_budget' => 'Neuen Kostenrahmen speichern',
|
'store_new_budget' => 'Neues Budget speichern',
|
||||||
'stored_new_budget' => 'Neuen Kostenrahmen „:name” speichern',
|
'stored_new_budget' => 'Neues Budget „:name” speichern',
|
||||||
'available_between' => 'Verfügbar zwischen :start und :end',
|
'available_between' => 'Verfügbar zwischen :start und :end',
|
||||||
'transactionsWithoutBudget' => 'Ausgaben ohne Kostenrahmen',
|
'transactionsWithoutBudget' => 'Ausgaben ohne Budget',
|
||||||
'transactions_no_budget' => 'Ausgaben ohne Kostenrahmen zwischen :start und :end',
|
'transactions_no_budget' => 'Ausgaben ohne Budget zwischen :start und :end',
|
||||||
'spent_between' => 'Ausgegeben zwischen :start und :end',
|
'spent_between' => 'Ausgegeben zwischen :start und :end',
|
||||||
'createBudget' => 'Neuer Kostenrahmen',
|
'createBudget' => 'Neues Budget',
|
||||||
'inactiveBudgets' => 'Inaktive Kostenrahmen',
|
'inactiveBudgets' => 'Inaktive Budgets',
|
||||||
'without_budget_between' => 'Buchungen ohne Kostenrahmen zwischen :start und :end',
|
'without_budget_between' => 'Buchungen ohne Budget zwischen :start und :end',
|
||||||
'delete_budget' => 'Kostenrahmen „:name” löschen',
|
'delete_budget' => 'Kostenrahmen „:name” löschen',
|
||||||
'deleted_budget' => 'Kostenrahmen „:name” gelöscht',
|
'deleted_budget' => 'Budget ":name" gelöscht',
|
||||||
'edit_budget' => 'Kostenrahmen „:name” bearbeiten',
|
'edit_budget' => 'Budget ":name" bearbeiten',
|
||||||
'updated_budget' => 'Kostenrahmen „:name” bearbeitet',
|
'updated_budget' => 'Kostenrahmen „:name” aktualisiert',
|
||||||
'update_amount' => 'Betrag aktualisieren',
|
'update_amount' => 'Betrag aktualisieren',
|
||||||
'update_budget' => 'Kostenrahmen aktualisieren',
|
'update_budget' => 'Budget aktualisieren',
|
||||||
'update_budget_amount_range' => '(Erwarteter) Verfügbaren Betrag zwischen :start und :end aktualisieren',
|
'update_budget_amount_range' => '(Erwarteter) Verfügbaren Betrag zwischen :start und :end aktualisieren',
|
||||||
'budget_period_navigator' => 'Zeitraum-Navigator',
|
'budget_period_navigator' => 'Zeitraum-Navigator',
|
||||||
'info_on_available_amount' => 'Was habe ich verfügbar?',
|
'info_on_available_amount' => 'Was habe ich verfügbar?',
|
||||||
@@ -683,32 +682,32 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
// accounts:
|
// accounts:
|
||||||
'account_missing_transaction' => 'Konto #:id („:name”) kann nicht direkt angezeigt werden, denn Firefly fehlen Weiterleitungsinformationen.',
|
'account_missing_transaction' => 'Konto #:id („:name”) kann nicht direkt angezeigt werden, denn Firefly fehlen Weiterleitungsinformationen.',
|
||||||
'details_for_asset' => 'Informationen zum Bestandskonto „:name”',
|
'details_for_asset' => 'Informationen zum Bestandskonto „:name”',
|
||||||
'details_for_expense' => 'Angaben zum Spesenkonto „:name”',
|
'details_for_expense' => 'Details zum Kreditor (Ausgabenkonto) „:name”',
|
||||||
'details_for_revenue' => 'Angaben zum Erlöskonto „:name”',
|
'details_for_revenue' => 'Angaben zum Erlöskonto „:name”',
|
||||||
'details_for_cash' => 'Angaben zum Kassenkonto „:name”',
|
'details_for_cash' => 'Angaben zum Kassenkonto „:name”',
|
||||||
'store_new_asset_account' => 'Neues Bestandskonto speichern',
|
'store_new_asset_account' => 'Neues Bestandskonto speichern',
|
||||||
'store_new_expense_account' => 'Speichere neuen Debitor (Ausgabe)',
|
'store_new_expense_account' => 'Neuen Kreditor (Ausgabenkonto) speichern',
|
||||||
'store_new_revenue_account' => 'Speichere neuen Schuldner',
|
'store_new_revenue_account' => 'Speichere neuen Schuldner',
|
||||||
'edit_asset_account' => 'Bestandskonto „:name” bearbeiten',
|
'edit_asset_account' => 'Bestandskonto „:name” bearbeiten',
|
||||||
'edit_expense_account' => 'Spesenkonto „:name” bearbeiten',
|
'edit_expense_account' => 'Kreditor (Ausgabenkonto) „:name” bearbeiten',
|
||||||
'edit_revenue_account' => 'Erlöskonto „:name” bearbeiten',
|
'edit_revenue_account' => 'Erlöskonto „:name” bearbeiten',
|
||||||
'delete_asset_account' => 'Bestandskonto „:name” löschen',
|
'delete_asset_account' => 'Bestandskonto „:name” löschen',
|
||||||
'delete_expense_account' => 'Spesenkonto „:name” löschen',
|
'delete_expense_account' => 'Kreditor (Ausgabenkonto) „:name” löschen',
|
||||||
'delete_revenue_account' => 'Erlöskonto „:name” löschen',
|
'delete_revenue_account' => 'Erlöskonto „:name” löschen',
|
||||||
'delete_liabilities_account' => 'Verbindlichkeit „:name” löschen',
|
'delete_liabilities_account' => 'Verbindlichkeit „:name” löschen',
|
||||||
'asset_deleted' => 'Bestandskonto „:name” erfolgreich gelöscht',
|
'asset_deleted' => 'Bestandskonto „:name” erfolgreich gelöscht',
|
||||||
'expense_deleted' => 'Spesenkonto „:name” erfolgreich gelöscht',
|
'expense_deleted' => 'Kreditor (Ausgabenkonto) „:name” erfolgreich gelöscht',
|
||||||
'revenue_deleted' => 'Erlöskonto „:name” erfolgreich gelöscht',
|
'revenue_deleted' => 'Erlöskonto „:name” erfolgreich gelöscht',
|
||||||
'update_asset_account' => 'Bestandskonto aktualisieren',
|
'update_asset_account' => 'Bestandskonto aktualisieren',
|
||||||
'update_liabilities_account' => 'Verbindlichkeit aktualisieren',
|
'update_liabilities_account' => 'Verbindlichkeit aktualisieren',
|
||||||
'update_expense_account' => 'Debitor (Ausgabe) bearbeiten',
|
'update_expense_account' => 'Kreditor (Ausgabenkonto) aktualisieren',
|
||||||
'update_revenue_account' => 'Schuldner bearbeiten',
|
'update_revenue_account' => 'Schuldner bearbeiten',
|
||||||
'make_new_asset_account' => 'Neues Bestandskonto erstellen',
|
'make_new_asset_account' => 'Neues Bestandskonto erstellen',
|
||||||
'make_new_expense_account' => 'Neuen Debitor (Ausgabe) erstellen',
|
'make_new_expense_account' => 'Einen neuen Kreditor (Ausgabenkonto) erstellen',
|
||||||
'make_new_revenue_account' => 'Neuen Schuldner erstellen',
|
'make_new_revenue_account' => 'Neuen Schuldner erstellen',
|
||||||
'make_new_liabilities_account' => 'Neue Verbindlichkeit erstellen',
|
'make_new_liabilities_account' => 'Neue Verbindlichkeit erstellen',
|
||||||
'asset_accounts' => 'Bestandskonten',
|
'asset_accounts' => 'Bestandskonten',
|
||||||
'expense_accounts' => 'Debitoren (Ausgaben)',
|
'expense_accounts' => 'Kreditoren (Ausgabenkonten)',
|
||||||
'revenue_accounts' => 'Schuldner',
|
'revenue_accounts' => 'Schuldner',
|
||||||
'cash_accounts' => 'Bargeldkonten',
|
'cash_accounts' => 'Bargeldkonten',
|
||||||
'Cash account' => 'Bargeldkonto',
|
'Cash account' => 'Bargeldkonto',
|
||||||
@@ -744,7 +743,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'no_data_for_chart' => 'Es gibt derzeit (noch) nicht genügend Informationen, um dieses Diagramm zu generieren.',
|
'no_data_for_chart' => 'Es gibt derzeit (noch) nicht genügend Informationen, um dieses Diagramm zu generieren.',
|
||||||
'select_more_than_one_account' => 'Bitte wählen Sie mehr als einen Konto aus',
|
'select_more_than_one_account' => 'Bitte wählen Sie mehr als einen Konto aus',
|
||||||
'select_more_than_one_category' => 'Bitte wählen Sie mehr als eine Kategorie aus',
|
'select_more_than_one_category' => 'Bitte wählen Sie mehr als eine Kategorie aus',
|
||||||
'select_more_than_one_budget' => 'Bitte wählen Sie mehr als einen Kostenrahmen aus',
|
'select_more_than_one_budget' => 'Bitte wählen Sie mehr als ein Budget aus',
|
||||||
'select_more_than_one_tag' => 'Bitte wählen Sie mehr als ein Schlüsselwort aus',
|
'select_more_than_one_tag' => 'Bitte wählen Sie mehr als ein Schlüsselwort aus',
|
||||||
'account_default_currency' => 'Dies ist die Standardwährung für dieses Konto.',
|
'account_default_currency' => 'Dies ist die Standardwährung für dieses Konto.',
|
||||||
'reconcile_has_more' => 'Ihr Firefly III-Konto verfügt über mehr Geld, als Ihre Bank behauptet. Es gibt mehrere Möglichkeiten. Bitte wählen Sie aus, was Sie tun möchten. Drücken Sie anschließend auf „Ausgleich bestätigen”.',
|
'reconcile_has_more' => 'Ihr Firefly III-Konto verfügt über mehr Geld, als Ihre Bank behauptet. Es gibt mehrere Möglichkeiten. Bitte wählen Sie aus, was Sie tun möchten. Drücken Sie anschließend auf „Ausgleich bestätigen”.',
|
||||||
@@ -808,13 +807,13 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'mass_edit_journals' => 'Anzahl von Buchungen bearbeiten',
|
'mass_edit_journals' => 'Anzahl von Buchungen bearbeiten',
|
||||||
'mass_bulk_journals' => 'Massenbearbeitung mehrerer Buchungen',
|
'mass_bulk_journals' => 'Massenbearbeitung mehrerer Buchungen',
|
||||||
'mass_bulk_journals_explain' => 'Wenn Sie Ihre Buchungen nicht einzeln mit der Massenbearbeitungsfunktion ändern möchten, können Sie diese in einem Schritt aktualisieren. Wählen Sie einfach in den untenstehenden Feldern die bevorzugte Kategorie, die Schlüsselwörter oder das zur Verfügung stehende Budget aus, und alle Umsätze in der Tabelle werden aktualisiert.',
|
'mass_bulk_journals_explain' => 'Wenn Sie Ihre Buchungen nicht einzeln mit der Massenbearbeitungsfunktion ändern möchten, können Sie diese in einem Schritt aktualisieren. Wählen Sie einfach in den untenstehenden Feldern die bevorzugte Kategorie, die Schlüsselwörter oder das zur Verfügung stehende Budget aus, und alle Umsätze in der Tabelle werden aktualisiert.',
|
||||||
'bulk_set_new_values' => 'Verwenden Sie die folgenden Eingänge, um neue Werte einzustellen. Wenn Sie sie leer lassen, werden sie für alle geleert. Beachten Sie auch, dass nur Abhebungen mit einem Kostenrahmen versehen werden.',
|
'bulk_set_new_values' => 'Verwenden Sie die folgenden Felder, um neue Werte einzustellen. Wenn Sie sie leer lassen, werden sie für alle geleert. Beachten Sie auch, dass nur Abhebungen mit einem Budget versehen werden.',
|
||||||
'no_bulk_category' => 'Kategorie nicht aktualisieren',
|
'no_bulk_category' => 'Kategorie nicht aktualisieren',
|
||||||
'no_bulk_budget' => 'Kostenrahmen nicht aktualisieren',
|
'no_bulk_budget' => 'Budget nicht aktualisieren',
|
||||||
'no_bulk_tags' => 'Schlagwörter nicht aktualisieren',
|
'no_bulk_tags' => 'Schlagwörter nicht aktualisieren',
|
||||||
'bulk_edit' => 'Massenbearbeitung',
|
'bulk_edit' => 'Massenbearbeitung',
|
||||||
'cannot_edit_other_fields' => 'Andere Felder als die hier gezeigten können Sie nicht gleichzeitig bearbeitet werden, da es keinen Platz gibt, diese anzuzeigen. Bitte folgen Sie dem Link und bearbeiten Sie die Felder einzeln, wenn Sie diese bearbeiten möchten.',
|
'cannot_edit_other_fields' => 'Andere Felder als die hier gezeigten können Sie nicht gleichzeitig bearbeitet werden, da es keinen Platz gibt, diese anzuzeigen. Bitte folgen Sie dem Link und bearbeiten Sie die Felder einzeln, wenn Sie diese bearbeiten möchten.',
|
||||||
'no_budget' => '(kein Kostenrahmen)',
|
'no_budget' => '(kein Budget)',
|
||||||
'no_budget_squared' => '(kein Kostenrahmen)',
|
'no_budget_squared' => '(kein Kostenrahmen)',
|
||||||
'perm-delete-many' => 'Das Löschen von mehreren Elementen auf einmal kann sich störend auswirken. Bitte seien Sie vorsichtig.',
|
'perm-delete-many' => 'Das Löschen von mehreren Elementen auf einmal kann sich störend auswirken. Bitte seien Sie vorsichtig.',
|
||||||
'mass_deleted_transactions_success' => ':amount Überweisung(en) gelöscht.',
|
'mass_deleted_transactions_success' => ':amount Überweisung(en) gelöscht.',
|
||||||
@@ -850,7 +849,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
|
|
||||||
// home page:
|
// home page:
|
||||||
'yourAccounts' => 'Deine Konten',
|
'yourAccounts' => 'Deine Konten',
|
||||||
'budgetsAndSpending' => 'Kostenrahmen und Ausgaben',
|
'budgetsAndSpending' => 'Budgets und Ausgaben',
|
||||||
'savings' => 'Erspartes',
|
'savings' => 'Erspartes',
|
||||||
'newWithdrawal' => 'Neue Ausgabe',
|
'newWithdrawal' => 'Neue Ausgabe',
|
||||||
'newDeposit' => 'Neue Einnahme',
|
'newDeposit' => 'Neue Einnahme',
|
||||||
@@ -872,14 +871,14 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'accounts' => 'Konten',
|
'accounts' => 'Konten',
|
||||||
'Asset account' => 'Bestandskonto',
|
'Asset account' => 'Bestandskonto',
|
||||||
'Default account' => 'Bestandskonto',
|
'Default account' => 'Bestandskonto',
|
||||||
'Expense account' => 'Debitor (Ausgabe)',
|
'Expense account' => 'Kreditor (Ausgabenkonto)',
|
||||||
'Revenue account' => 'Kreditor Einnahme',
|
'Revenue account' => 'Kreditor Einnahme',
|
||||||
'Initial balance account' => 'Eröffnungssaldo',
|
'Initial balance account' => 'Eröffnungssaldo',
|
||||||
'account_type_Debt' => 'Schuld',
|
'account_type_Debt' => 'Schuld',
|
||||||
'account_type_Loan' => 'Darlehen',
|
'account_type_Loan' => 'Darlehen',
|
||||||
'account_type_Mortgage' => 'Hypothek',
|
'account_type_Mortgage' => 'Hypothek',
|
||||||
'account_type_Credit card' => 'Kreditkarte',
|
'account_type_Credit card' => 'Kreditkarte',
|
||||||
'budgets' => 'Kostenrahmen',
|
'budgets' => 'Budgets',
|
||||||
'tags' => 'Schlagwörter',
|
'tags' => 'Schlagwörter',
|
||||||
'reports' => 'Berichte',
|
'reports' => 'Berichte',
|
||||||
'transactions' => 'Buchungen',
|
'transactions' => 'Buchungen',
|
||||||
@@ -935,7 +934,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'balanceEnd' => 'Bilanz zum Ende der Periode',
|
'balanceEnd' => 'Bilanz zum Ende der Periode',
|
||||||
'splitByAccount' => 'Nach Konto aufteilen',
|
'splitByAccount' => 'Nach Konto aufteilen',
|
||||||
'coveredWithTags' => 'Mit Schlagwörtern versehen',
|
'coveredWithTags' => 'Mit Schlagwörtern versehen',
|
||||||
'leftInBudget' => 'Verblieben im Kostenrahmen',
|
'leftInBudget' => 'Übrig im Budget',
|
||||||
'sumOfSums' => 'Summe der Summen',
|
'sumOfSums' => 'Summe der Summen',
|
||||||
'noCategory' => '(keine Kategorie)',
|
'noCategory' => '(keine Kategorie)',
|
||||||
'notCharged' => '(Noch) nicht belastet',
|
'notCharged' => '(Noch) nicht belastet',
|
||||||
@@ -964,7 +963,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'expense_entry' => 'Aufwendungen auf Konto „:name” zwischen :start und :end',
|
'expense_entry' => 'Aufwendungen auf Konto „:name” zwischen :start und :end',
|
||||||
'category_entry' => 'Aufwendungen der Kategorie „:name” zwischen :start und :end',
|
'category_entry' => 'Aufwendungen der Kategorie „:name” zwischen :start und :end',
|
||||||
'budget_spent_amount' => 'Ausgaben im Haushalt „:budget” zwischen :start und :end',
|
'budget_spent_amount' => 'Ausgaben im Haushalt „:budget” zwischen :start und :end',
|
||||||
'balance_amount' => 'Ausgaben im Kostenrahmen „:budget” bezahlt von Konto „:account” zwischen :start und :end',
|
'balance_amount' => 'Ausgaben im Budget „:budget” bezahlt von Konto „:account” zwischen :start und :end',
|
||||||
'no_audit_activity' => 'Zwischen :start und :end wurde keine Aktivität auf dem Konto <a href=":url" title=":account_name">:account_name</a> festgestellt.',
|
'no_audit_activity' => 'Zwischen :start und :end wurde keine Aktivität auf dem Konto <a href=":url" title=":account_name">:account_name</a> festgestellt.',
|
||||||
'audit_end_balance' => 'Kontostand von <a href=":url" title=":account_name">:account_name</a> Ende war: :balance',
|
'audit_end_balance' => 'Kontostand von <a href=":url" title=":account_name">:account_name</a> Ende war: :balance',
|
||||||
'reports_extra_options' => 'Zusatzoptionen',
|
'reports_extra_options' => 'Zusatzoptionen',
|
||||||
@@ -976,7 +975,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'select_tag' => 'Schlagworte wählen.',
|
'select_tag' => 'Schlagworte wählen.',
|
||||||
'income_per_category' => 'Einnahmen pro Kategorie',
|
'income_per_category' => 'Einnahmen pro Kategorie',
|
||||||
'expense_per_category' => 'Ausgaben pro Kategorie',
|
'expense_per_category' => 'Ausgaben pro Kategorie',
|
||||||
'expense_per_budget' => 'Ausgaben Je Kostenrahmen',
|
'expense_per_budget' => 'Ausgaben pro Budget',
|
||||||
'income_per_account' => 'Einnahmen pro Konto',
|
'income_per_account' => 'Einnahmen pro Konto',
|
||||||
'expense_per_account' => 'Ausgaben pro Konto',
|
'expense_per_account' => 'Ausgaben pro Konto',
|
||||||
'expense_per_tag' => 'Ausgaben je Schlagwort',
|
'expense_per_tag' => 'Ausgaben je Schlagwort',
|
||||||
@@ -1004,19 +1003,19 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'account_role_savingAsset' => 'Sparkonto',
|
'account_role_savingAsset' => 'Sparkonto',
|
||||||
'account_role_ccAsset' => 'Kreditkarte',
|
'account_role_ccAsset' => 'Kreditkarte',
|
||||||
'account_role_cashWalletAsset' => 'Geldbörse',
|
'account_role_cashWalletAsset' => 'Geldbörse',
|
||||||
'budget_chart_click' => 'Klicken Sie auf einen Namen des Kostenrahmen in der obigen Tabelle, um ein Diagramm anzuzeigen.',
|
'budget_chart_click' => 'Klicken Sie auf einen Budgetnamen in der obigen Tabelle, um ein Diagramm anzuzeigen.',
|
||||||
'category_chart_click' => 'Klicken Sie auf einen Kategorienamen in der obigen Tabelle, um ein Diagramm zu sehen.',
|
'category_chart_click' => 'Klicken Sie auf einen Kategorienamen in der obigen Tabelle, um ein Diagramm zu sehen.',
|
||||||
'in_out_accounts' => 'Einnahmen und Ausgaben je Kombination',
|
'in_out_accounts' => 'Einnahmen und Ausgaben je Kombination',
|
||||||
'in_out_per_category' => 'Einnahmen und Ausgaben je Kategorie',
|
'in_out_per_category' => 'Einnahmen und Ausgaben je Kategorie',
|
||||||
'out_per_budget' => 'Ausgaben je Kostenrahmen',
|
'out_per_budget' => 'Ausgaben je Budget',
|
||||||
'select_expense_revenue' => 'Aufwands-/Erlöskonto auswählen',
|
'select_expense_revenue' => 'Aufwands-/Erlöskonto auswählen',
|
||||||
|
|
||||||
// charts:
|
// charts:
|
||||||
'chart' => 'Diagram',
|
'chart' => 'Diagram',
|
||||||
'month' => 'Monat',
|
'month' => 'Monat',
|
||||||
'budget' => 'Kostenrahmen',
|
'budget' => 'Budget',
|
||||||
'spent' => 'Ausgegeben',
|
'spent' => 'Ausgegeben',
|
||||||
'spent_in_budget' => 'Verbraucht im Kostenrahmen',
|
'spent_in_budget' => 'Verbraucht im Budget',
|
||||||
'left_to_spend' => 'Verbleibend zum Ausgeben',
|
'left_to_spend' => 'Verbleibend zum Ausgeben',
|
||||||
'earned' => 'Verdient',
|
'earned' => 'Verdient',
|
||||||
'overspent' => 'Zuviel ausgegeben',
|
'overspent' => 'Zuviel ausgegeben',
|
||||||
@@ -1104,8 +1103,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'user_data_information' => 'Nutzerdaten',
|
'user_data_information' => 'Nutzerdaten',
|
||||||
'user_information' => 'Benutzerinformationen',
|
'user_information' => 'Benutzerinformationen',
|
||||||
'total_size' => 'Gesamtgröße',
|
'total_size' => 'Gesamtgröße',
|
||||||
'budget_or_budgets' => 'Kostenrahmen',
|
'budget_or_budgets' => 'Budget(s)',
|
||||||
'budgets_with_limits' => 'Kostenrahmen mit mit festgelegtem Betrag',
|
'budgets_with_limits' => 'Budget(s) mit festgelegtem Betrag',
|
||||||
'nr_of_rules_in_total_groups' => ':count_rules Regel(n) in :count_groups Gruppenregel(n)',
|
'nr_of_rules_in_total_groups' => ':count_rules Regel(n) in :count_groups Gruppenregel(n)',
|
||||||
'tag_or_tags' => 'Schlagwörter',
|
'tag_or_tags' => 'Schlagwörter',
|
||||||
'configuration_updated' => 'Die Konfiguration wurde aktualisiert',
|
'configuration_updated' => 'Die Konfiguration wurde aktualisiert',
|
||||||
@@ -1207,10 +1206,10 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'no_accounts_intro_asset' => 'Sie verfügen noch über keine Bestandskonten. Bestandskonten sind Ihre Hauptkonten: Ihr Girokonto, Sparkonto, Gemeinschaftskonto oder sogar Ihre Kreditkarte.',
|
'no_accounts_intro_asset' => 'Sie verfügen noch über keine Bestandskonten. Bestandskonten sind Ihre Hauptkonten: Ihr Girokonto, Sparkonto, Gemeinschaftskonto oder sogar Ihre Kreditkarte.',
|
||||||
'no_accounts_imperative_asset' => 'Um Firefly III nutzen zu können, müssen Sie mindestens ein Bestandskonto anlegen. Lassen Sie uns das jetzt tun:',
|
'no_accounts_imperative_asset' => 'Um Firefly III nutzen zu können, müssen Sie mindestens ein Bestandskonto anlegen. Lassen Sie uns das jetzt tun:',
|
||||||
'no_accounts_create_asset' => 'Bestandskonto anlegen',
|
'no_accounts_create_asset' => 'Bestandskonto anlegen',
|
||||||
'no_accounts_title_expense' => 'Lassen Sie uns jetzt ein Spesenkonto anlegen!',
|
'no_accounts_title_expense' => 'Lassen Sie uns jetzt einen Kreditor (Ausgabenkonto) anlegen!',
|
||||||
'no_accounts_intro_expense' => 'Sie besitzen noch keine Spesenkonten. Aufwandskonten sind die Orte, an denen Sie Geld ausgeben, wie z.B. in Geschäften und Supermärkten.',
|
'no_accounts_intro_expense' => 'Sie besitzen noch keine Ausgabenkonten. Ausgabenkonten sind die Orte, an denen Sie Geld ausgeben, wie z.B. in Geschäften und Supermärkten.',
|
||||||
'no_accounts_imperative_expense' => 'Spesenkonten werden beim Anlegen von Buchungen automatisch angelegt, können aber auch manuell angelegt werden. Lassen Sie uns jetzt eines erstellen:',
|
'no_accounts_imperative_expense' => 'Kreditoren (Ausgabenkonten) werden beim Anlegen von Buchungen automatisch angelegt, können aber auch manuell angelegt werden. Lassen Sie uns jetzt einen erstellen:',
|
||||||
'no_accounts_create_expense' => 'Spesenkonto anlegen',
|
'no_accounts_create_expense' => 'Einen Kreditor (Ausgabenkonto) anlegen',
|
||||||
'no_accounts_title_revenue' => 'Lassen Sie uns jetzt ein Einkommenskonto anlegen!',
|
'no_accounts_title_revenue' => 'Lassen Sie uns jetzt ein Einkommenskonto anlegen!',
|
||||||
'no_accounts_intro_revenue' => 'Sie verfügen noch über keine Ertragskonten. Ertragskonten sind die Einrichtungen, von denen Sie Geld erhalten, wie z.B. von Ihrem Arbeitgeber.',
|
'no_accounts_intro_revenue' => 'Sie verfügen noch über keine Ertragskonten. Ertragskonten sind die Einrichtungen, von denen Sie Geld erhalten, wie z.B. von Ihrem Arbeitgeber.',
|
||||||
'no_accounts_imperative_revenue' => 'Ertragskonten werden beim Anlegen von Buchungen automatisch angelegt, können aber auch manuell angelegt werden. Lassen Sie uns jetzt eines erstellen:',
|
'no_accounts_imperative_revenue' => 'Ertragskonten werden beim Anlegen von Buchungen automatisch angelegt, können aber auch manuell angelegt werden. Lassen Sie uns jetzt eines erstellen:',
|
||||||
@@ -1220,9 +1219,9 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
|
|||||||
'no_accounts_imperative_liabilities' => 'Sie müssen diese Funktion nicht verwenden, aber sie kann nützlich sein, wenn Sie diese Dinge im Auge behalten möchten.',
|
'no_accounts_imperative_liabilities' => 'Sie müssen diese Funktion nicht verwenden, aber sie kann nützlich sein, wenn Sie diese Dinge im Auge behalten möchten.',
|
||||||
'no_accounts_create_liabilities' => 'Verbindlichkeit erstellen',
|
'no_accounts_create_liabilities' => 'Verbindlichkeit erstellen',
|
||||||
'no_budgets_title_default' => 'Lassen Sie uns jetzt ein Haushaltsplan erstellen',
|
'no_budgets_title_default' => 'Lassen Sie uns jetzt ein Haushaltsplan erstellen',
|
||||||
'no_budgets_intro_default' => 'Sie verfügen noch über keine Kostenrahmen. Kostenrahmen werden verwendet, um Ihre Ausgaben in logische Gruppen zu gliedern, die Sie mit einem weichen Obergrenzemlimit versehen können, um Ihre Ausgaben zu begrenzen.',
|
'no_budgets_intro_default' => 'Sie haben noch keine Budgets. Budgets werden verwendet, um Ihre Ausgaben in logischen Gruppen zu organisieren, die Sie mit einem Limit versehen können, um Ihre Ausgaben zu begrenzen.',
|
||||||
'no_budgets_imperative_default' => 'Die Kostenrahmen sind die grundlegenden Instrumente des Finanzmanagements. Lassen Sie uns jetzt einen erstellen:',
|
'no_budgets_imperative_default' => 'Budgets sind die grundlegenden Instrumente des Finanzmanagements. Lassen Sie uns jetzt eines erstellen:',
|
||||||
'no_budgets_create_default' => 'Kostenrahmen erstellen',
|
'no_budgets_create_default' => 'Ein Budget erstellen',
|
||||||
'no_categories_title_default' => 'Erstellen wir eine Kategorie!',
|
'no_categories_title_default' => 'Erstellen wir eine Kategorie!',
|
||||||
'no_categories_intro_default' => 'Sie verfügen noch über keine Kategorien. Kategorien werden verwendet, um Ihre Buchungen zu verfeinern und mit der entsprechenden Kategorie zu kennzeichnen.',
|
'no_categories_intro_default' => 'Sie verfügen noch über keine Kategorien. Kategorien werden verwendet, um Ihre Buchungen zu verfeinern und mit der entsprechenden Kategorie zu kennzeichnen.',
|
||||||
'no_categories_imperative_default' => 'Kategorien werden automatisch angelegt, wenn Sie Buchungen anlegen, können aber auch manuell angelegt werden. Lassen Sie uns jetzt eine erstellen:',
|
'no_categories_imperative_default' => 'Kategorien werden automatisch angelegt, wenn Sie Buchungen anlegen, können aber auch manuell angelegt werden. Lassen Sie uns jetzt eine erstellen:',
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ return [
|
|||||||
'split_journal_explanation' => 'Diese Überweisung in mehrere Teile aufteilen',
|
'split_journal_explanation' => 'Diese Überweisung in mehrere Teile aufteilen',
|
||||||
'currency' => 'Währung',
|
'currency' => 'Währung',
|
||||||
'account_id' => 'Bestandskonto',
|
'account_id' => 'Bestandskonto',
|
||||||
'budget_id' => 'Kostenrahmen',
|
'budget_id' => 'Budget',
|
||||||
'openingBalance' => 'Eröffnungsbilanz',
|
'openingBalance' => 'Eröffnungsbilanz',
|
||||||
'tagMode' => 'Schlagwort-Modus',
|
'tagMode' => 'Schlagwort-Modus',
|
||||||
'tag_position' => 'Schlagwort-Speicherort',
|
'tag_position' => 'Schlagwort-Speicherort',
|
||||||
@@ -145,7 +145,7 @@ return [
|
|||||||
'accounts' => 'Exportiere die Überweisungen von diesem Konto',
|
'accounts' => 'Exportiere die Überweisungen von diesem Konto',
|
||||||
'delete_account' => 'Konto „:name” löschen',
|
'delete_account' => 'Konto „:name” löschen',
|
||||||
'delete_bill' => 'Rechnung „:name” löschen',
|
'delete_bill' => 'Rechnung „:name” löschen',
|
||||||
'delete_budget' => 'Kostenrahmen „:name” löschen',
|
'delete_budget' => 'Budget „:name” löschen',
|
||||||
'delete_category' => 'Kategorie „:name” löschen',
|
'delete_category' => 'Kategorie „:name” löschen',
|
||||||
'delete_currency' => 'Währung „:name” löschen',
|
'delete_currency' => 'Währung „:name” löschen',
|
||||||
'delete_journal' => 'Lösche Überweisung mit Beschreibung ":description"',
|
'delete_journal' => 'Lösche Überweisung mit Beschreibung ":description"',
|
||||||
@@ -180,7 +180,7 @@ return [
|
|||||||
'also_delete_rules' => 'Die einzige Regel, die mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Regeln, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.',
|
'also_delete_rules' => 'Die einzige Regel, die mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Regeln, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.',
|
||||||
'also_delete_piggyBanks' => 'Das einzige Sparschwein, das mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Sparschweine, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.',
|
'also_delete_piggyBanks' => 'Das einzige Sparschwein, das mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Sparschweine, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.',
|
||||||
'bill_keep_transactions' => 'Die einzige mit dieser Rechnung verbundene Buchung wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.',
|
'bill_keep_transactions' => 'Die einzige mit dieser Rechnung verbundene Buchung wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.',
|
||||||
'budget_keep_transactions' => 'Die einzige mit diesem Kostenrahmen verbundene Buchung wird nicht gelöscht. | Alle :count Buchungen, die mit diesem Kostenrahmen verbunden sind, werden nicht gelöscht.',
|
'budget_keep_transactions' => 'Die einzige mit diesem Budget zugeordnete Buchung wird nicht gelöscht. | Alle :count Buchungen, die diesem Budget zugeordnet sind, werden nicht gelöscht.',
|
||||||
'category_keep_transactions' => 'Die einzige Buchung, die mit dieser Kategorie verbunden ist, wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Kategorie verbunden sind, werden nicht gelöscht.',
|
'category_keep_transactions' => 'Die einzige Buchung, die mit dieser Kategorie verbunden ist, wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Kategorie verbunden sind, werden nicht gelöscht.',
|
||||||
'recurring_keep_transactions' => 'Die einzige Buchung, die durch diesen Dauerauftrag erstellt wurde, wird nicht gelöscht. | Alle :count Buchungen, die durch diesen Dauerauftrag erstellt wurden, werden nicht gelöscht.',
|
'recurring_keep_transactions' => 'Die einzige Buchung, die durch diesen Dauerauftrag erstellt wurde, wird nicht gelöscht. | Alle :count Buchungen, die durch diesen Dauerauftrag erstellt wurden, werden nicht gelöscht.',
|
||||||
'tag_keep_transactions' => 'Das einzige mit dieser Rechnung verbundene Schlagwort wird nicht gelöscht. | Alle :count Schlagwörter, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.',
|
'tag_keep_transactions' => 'Das einzige mit dieser Rechnung verbundene Schlagwort wird nicht gelöscht. | Alle :count Schlagwörter, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.',
|
||||||
|
|||||||
@@ -167,13 +167,13 @@ return [
|
|||||||
'job_config_ynab_apply_rules_text' => 'Standardmäßig werden Ihre Regeln auf die Buchungen angewendet, die während dieser Importroutine erstellt wurden. Wenn Sie dies nicht möchten, deaktivieren Sie dieses Kontrollkästchen.',
|
'job_config_ynab_apply_rules_text' => 'Standardmäßig werden Ihre Regeln auf die Buchungen angewendet, die während dieser Importroutine erstellt wurden. Wenn Sie dies nicht möchten, deaktivieren Sie dieses Kontrollkästchen.',
|
||||||
|
|
||||||
// job configuration for YNAB:
|
// job configuration for YNAB:
|
||||||
'job_config_ynab_select_budgets' => 'Wählen Sie Ihren Kostenrahmen aus',
|
'job_config_ynab_select_budgets' => 'Wählen Sie Ihr Budget aus',
|
||||||
'job_config_ynab_select_budgets_text' => 'Sie haben :count Kostenrahmen bei YNAB gespeichert. Bitte wählen Sie diejenige aus, aus der Firefly III die Buchungen importieren soll.',
|
'job_config_ynab_select_budgets_text' => 'Sie haben :count Budgets bei YNAB gespeichert. Bitte wählen Sie dasjenige aus, aus dem Firefly III die Buchungen importieren soll.',
|
||||||
'job_config_ynab_no_budgets' => 'Es sind keine Kostenrahmen verfügbar, aus denen importiert werden kann.',
|
'job_config_ynab_no_budgets' => 'Es sind keine Budgets verfügbar, aus denen importiert werden kann.',
|
||||||
'ynab_no_mapping' => 'Es wurden keine Konten zum Importieren ausgewählt.',
|
'ynab_no_mapping' => 'Es wurden keine Konten zum Importieren ausgewählt.',
|
||||||
'job_config_ynab_bad_currency' => 'Aus de(n/m) folgenden Kostenrahmen kann nicht importieren werden, da Sie über keine Konten mit der gleichen Währung wie diese Kostenrahmen verfügen.',
|
'job_config_ynab_bad_currency' => 'Aus de(n/m) folgenden Budget(s) kann nicht importieren werden, da Sie über keine Konten mit der gleichen Währung wie diese(s) Budget(s) verfügen.',
|
||||||
'job_config_ynab_accounts_title' => 'Konten auswählen',
|
'job_config_ynab_accounts_title' => 'Konten auswählen',
|
||||||
'job_config_ynab_accounts_text' => 'In diesem Kostenrahmen stehen Ihnen die folgenden Konten zur Verfügung. Bitte wählen Sie aus, von welchen Konten Sie importieren möchten und wo die Buchungen gespeichert werden sollen.',
|
'job_config_ynab_accounts_text' => 'In diesem Budget stehen Ihnen die folgenden Konten zur Verfügung. Bitte wählen Sie aus, von welchen Konten Sie importieren möchten und wo die Buchungen gespeichert werden sollen.',
|
||||||
|
|
||||||
|
|
||||||
// keys from "extra" array:
|
// keys from "extra" array:
|
||||||
@@ -261,13 +261,13 @@ return [
|
|||||||
'column_account-bic' => 'Bestandskonto (BIC)',
|
'column_account-bic' => 'Bestandskonto (BIC)',
|
||||||
'column_amount' => 'Betrag',
|
'column_amount' => 'Betrag',
|
||||||
'column_amount_foreign' => 'Betrag (in Fremdwährung)',
|
'column_amount_foreign' => 'Betrag (in Fremdwährung)',
|
||||||
'column_amount_debit' => 'Betrag (Debitoren-Spalte)',
|
'column_amount_debit' => 'Betrag (Ausgabe)',
|
||||||
'column_amount_credit' => 'Betrag (Guthaben-Spalte)',
|
'column_amount_credit' => 'Betrag (Guthaben-Spalte)',
|
||||||
'column_amount-comma-separated' => 'Betrag (Komma als Dezimaltrennzeichen)',
|
'column_amount-comma-separated' => 'Betrag (Komma als Dezimaltrennzeichen)',
|
||||||
'column_bill-id' => 'Rechnung (ID übereinstimmend mit FF3)',
|
'column_bill-id' => 'Rechnung (ID übereinstimmend mit FF3)',
|
||||||
'column_bill-name' => 'Rechnungsname',
|
'column_bill-name' => 'Rechnungsname',
|
||||||
'column_budget-id' => 'Kostenrahmen-ID (übereinstimmend mit FF3)',
|
'column_budget-id' => 'Budget-ID (übereinstimmend mit FF3)',
|
||||||
'column_budget-name' => 'Kostenrahmenname',
|
'column_budget-name' => 'Budgetname',
|
||||||
'column_category-id' => 'Kategorie (ID übereinstimmend mit FF3)',
|
'column_category-id' => 'Kategorie (ID übereinstimmend mit FF3)',
|
||||||
'column_category-name' => 'Kategorie (Name)',
|
'column_category-name' => 'Kategorie (Name)',
|
||||||
'column_currency-code' => 'Währungsstandard (ISO 4217)',
|
'column_currency-code' => 'Währungsstandard (ISO 4217)',
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ return [
|
|||||||
'accounts_create_asset_virtual' => 'Es kann manchmal helfen, Ihrem Konto ein virtuelles Gleichgewicht zu geben: eine zusätzliche Menge, die dem tatsächlichen Kontostand immer hinzugefügt oder daraus entfernt wird.',
|
'accounts_create_asset_virtual' => 'Es kann manchmal helfen, Ihrem Konto ein virtuelles Gleichgewicht zu geben: eine zusätzliche Menge, die dem tatsächlichen Kontostand immer hinzugefügt oder daraus entfernt wird.',
|
||||||
|
|
||||||
// budgets index
|
// budgets index
|
||||||
'budgets_index_intro' => 'Kostenrahmen werden zur Verwaltung Ihrer Finanzen verwendet und bilden eine der Kernfunktionen von Firefly III.',
|
'budgets_index_intro' => 'Mit Budgets verwalten Sie Ihre Finanzen und bilden damit eine der Kernfunktionen von Firefly III.',
|
||||||
'budgets_index_set_budget' => 'Stellen Sie Ihr Gesamthaushaltsplan für jeden Zeitraum so ein, dass Firefly III Ihnen mitteilen kann, ob Sie alle verfügbaren Gelder vorgesehen haben.',
|
'budgets_index_set_budget' => 'Stellen Sie Ihr Gesamthaushaltsplan für jeden Zeitraum so ein, dass Firefly III Ihnen mitteilen kann, ob Sie alle verfügbaren Gelder vorgesehen haben.',
|
||||||
'budgets_index_see_expenses_bar' => 'Dieser Balken wird sich langsam füllen, wenn Sie Geld ausgeben.',
|
'budgets_index_see_expenses_bar' => 'Dieser Balken wird sich langsam füllen, wenn Sie Geld ausgeben.',
|
||||||
'budgets_index_navigate_periods' => 'Navigieren Sie durch Zeitabschnitte, um Kostenrahmen im Voraus festzulegen.',
|
'budgets_index_navigate_periods' => 'Navigieren Sie durch Zeiträume, um die Budgets im Voraus zu setzen.',
|
||||||
'budgets_index_new_budget' => 'Erstellen Sie neue Kostenrahmen, wie Sie es für richtig halten.',
|
'budgets_index_new_budget' => 'Erstellen Sie neue Budgets nach Ihren Wünschen.',
|
||||||
'budgets_index_list_of_budgets' => 'Verwenden Sie diese Tabelle, um die Beträge für jeden Kostenrahmen festzulegen und einen Überblick zu erhalten.',
|
'budgets_index_list_of_budgets' => 'Verwenden Sie diese Tabelle, um die Beträge für jedes Budget festzulegen und einen Überblick zu erhalten.',
|
||||||
'budgets_index_outro' => 'Um mehr über die Finanzplanung zu erfahren, klicken Sie auf das Hilfesymbol in der oberen rechten Ecke.',
|
'budgets_index_outro' => 'Um mehr über die Finanzplanung zu erfahren, klicken Sie auf das Hilfesymbol in der oberen rechten Ecke.',
|
||||||
|
|
||||||
// reports (index)
|
// reports (index)
|
||||||
@@ -64,11 +64,11 @@ return [
|
|||||||
|
|
||||||
'reports_report_tag_intro' => 'Dieser Bericht gibt Ihnen Einblick in eine oder mehrere Schlagwörter.',
|
'reports_report_tag_intro' => 'Dieser Bericht gibt Ihnen Einblick in eine oder mehrere Schlagwörter.',
|
||||||
'reports_report_tag_pieCharts' => 'Diese Diagramme geben Ihnen Einblick in Ausgaben und Einnahmen ja Schlagwort, Konto, Kategorie oder Kostenrahmen.',
|
'reports_report_tag_pieCharts' => 'Diese Diagramme geben Ihnen Einblick in Ausgaben und Einnahmen ja Schlagwort, Konto, Kategorie oder Kostenrahmen.',
|
||||||
'reports_report_tag_incomeAndExpensesChart' => 'Diese Tabelle zeigt Ihre Ausgaben und Einnahmen ja Schlagwort.',
|
'reports_report_tag_incomeAndExpensesChart' => 'Diese Tabelle zeigt Ihre Ausgaben und Einnahmen je Schlagwort.',
|
||||||
|
|
||||||
'reports_report_budget_intro' => 'Dieser Bericht gibt Ihnen Einblick in eine oder mehrere Kostenrahmen.',
|
'reports_report_budget_intro' => 'Dieser Bericht gibt Ihnen Einblick in eine oder mehrere Budgets.',
|
||||||
'reports_report_budget_pieCharts' => 'Diese Diagramme geben Ihnen Einblick in Ausgaben und Einnahmen je Kostenrahmen oder Konto.',
|
'reports_report_budget_pieCharts' => 'Diese Diagramme geben Ihnen Einblick in Ausgaben und Einnahmen pro Budget oder pro Konto.',
|
||||||
'reports_report_budget_incomeAndExpensesChart' => 'Diese Tabelle zeigt Ihre Ausgaben und Einnahmen je Kostenrahmen.',
|
'reports_report_budget_incomeAndExpensesChart' => 'Dieses Diagramm zeigt Ihre Ausgaben und Einnahmen je Budget.',
|
||||||
|
|
||||||
// create transaction
|
// create transaction
|
||||||
'transactions_create_switch_box' => 'Verwenden Sie diese Schaltflächen, um schnell den Typ der Transaktion zu ändern, die Sie speichern möchten.',
|
'transactions_create_switch_box' => 'Verwenden Sie diese Schaltflächen, um schnell den Typ der Transaktion zu ändern, die Sie speichern möchten.',
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ return [
|
|||||||
'from' => 'Von',
|
'from' => 'Von',
|
||||||
'piggy_bank' => 'Sparschwein',
|
'piggy_bank' => 'Sparschwein',
|
||||||
'to' => 'An',
|
'to' => 'An',
|
||||||
'budget' => 'Kostenrahmen',
|
'budget' => 'Budget',
|
||||||
'category' => 'Kategorie',
|
'category' => 'Kategorie',
|
||||||
'bill' => 'Rechnung',
|
'bill' => 'Rechnung',
|
||||||
'withdrawal' => 'Ausgabe',
|
'withdrawal' => 'Ausgabe',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ declare(strict_types=1);
|
|||||||
return [
|
return [
|
||||||
'password' => 'Passwörter müssen mindestens 6 Zeichen lang sein und übereinstimmen.',
|
'password' => 'Passwörter müssen mindestens 6 Zeichen lang sein und übereinstimmen.',
|
||||||
'user' => 'Wir können keinen Benutzer mit dieser E-Mail Adresse finden.',
|
'user' => 'Wir können keinen Benutzer mit dieser E-Mail Adresse finden.',
|
||||||
'token' => 'Der Authentifizierungsschlüssel zum Zurücksetzen des Passwortes ist ungültig.',
|
'token' => 'Das Token zum Zurücksetzen des Passwortes ist ungültig.',
|
||||||
'sent' => 'Wir haben Ihnen einen Link zum Zurücksetzen des Passworts zugesendet!',
|
'sent' => 'Wir haben Ihnen einen Link zum Zurücksetzen des Passworts zugesendet!',
|
||||||
'reset' => 'Ihr Passwort wurde zurückgesetzt!',
|
'reset' => 'Ihr Passwort wurde zurückgesetzt!',
|
||||||
'blocked' => 'Netter Versuch.',
|
'blocked' => 'Netter Versuch.',
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ return [
|
|||||||
'date_format' => 'Format de la date',
|
'date_format' => 'Format de la date',
|
||||||
'specifix' => 'Banque - ou déposer des corrections spécifiques',
|
'specifix' => 'Banque - ou déposer des corrections spécifiques',
|
||||||
'attachments[]' => 'Pièces jointes',
|
'attachments[]' => 'Pièces jointes',
|
||||||
'store_new_withdrawal' => 'Enregistrer un nouveau retrait',
|
'store_new_withdrawal' => 'Enregistrer une nouvelle dépense',
|
||||||
'store_new_deposit' => 'Enregistrer un nouveau dépôt',
|
'store_new_deposit' => 'Enregistrer un nouveau dépôt',
|
||||||
'store_new_transfer' => 'Enregistrer un nouveau transfert',
|
'store_new_transfer' => 'Enregistrer un nouveau transfert',
|
||||||
'add_new_withdrawal' => 'Ajouter un nouveau retrait',
|
'add_new_withdrawal' => 'Ajouter un nouveau retrait',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'html_language' => 'tr',
|
'html_language' => 'tr',
|
||||||
'locale' => 'en, English, en_US.utf8, en_US.UTF-8',
|
'locale' => 'tr, Turkish, tr_TR, tr_TR.utf8, tr_TR.UTF-8',
|
||||||
'month' => '%B %Y',
|
'month' => '%B %Y',
|
||||||
'month_and_day' => '%e %B %Y',
|
'month_and_day' => '%e %B %Y',
|
||||||
'month_and_date_day' => '%A %B %e, %Y',
|
'month_and_date_day' => '%A %B %e, %Y',
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ return [
|
|||||||
'cancel' => 'İptal',
|
'cancel' => 'İptal',
|
||||||
'from' => 'Gönderen',
|
'from' => 'Gönderen',
|
||||||
'to' => 'Alıcı',
|
'to' => 'Alıcı',
|
||||||
'help_translating' => 'This help text is not yet available in your language. <a href="https://crowdin.com/project/firefly-iii-help">Will you help translate?</a>',
|
'help_translating' => 'Bu yardım metni henüz sizin dilinizde bulunmamaktadır. <a href="https://crowdin.com/project/firefly-iii-help">Çeviriye katkı sağlamak ister misiniz?</a>',
|
||||||
'showEverything' => 'Her şeyi göster',
|
'showEverything' => 'Her şeyi göster',
|
||||||
'never' => 'Asla',
|
'never' => 'Asla',
|
||||||
'no_results_for_empty_search' => 'Aramanız boştu, bu nedenle hiçbir şey bulunamadı.',
|
'no_results_for_empty_search' => 'Aramanız boştu, bu nedenle hiçbir şey bulunamadı.',
|
||||||
@@ -62,7 +62,7 @@ return [
|
|||||||
'new_asset_account' => 'Yeni varlık hesabı',
|
'new_asset_account' => 'Yeni varlık hesabı',
|
||||||
'new_expense_account' => 'Yeni gider hesabı',
|
'new_expense_account' => 'Yeni gider hesabı',
|
||||||
'new_revenue_account' => 'Yeni Gelir Hesabı',
|
'new_revenue_account' => 'Yeni Gelir Hesabı',
|
||||||
'new_liabilities_account' => 'New liability',
|
'new_liabilities_account' => 'Yeni sorumluluk',
|
||||||
'new_budget' => 'Yeni bütçe',
|
'new_budget' => 'Yeni bütçe',
|
||||||
'new_bill' => 'Yeni Fatura',
|
'new_bill' => 'Yeni Fatura',
|
||||||
'block_account_logout' => 'Çıkış yaptınız. Engellenen hesaplar bu siteyi kullanamaz. Geçerli bir e-posta adresiyle kayıt oldunuz mu?',
|
'block_account_logout' => 'Çıkış yaptınız. Engellenen hesaplar bu siteyi kullanamaz. Geçerli bir e-posta adresiyle kayıt oldunuz mu?',
|
||||||
@@ -91,7 +91,7 @@ return [
|
|||||||
'warning_much_data' => ':days günlük verinin yüklenmesi biraz zaman alabilir.',
|
'warning_much_data' => ':days günlük verinin yüklenmesi biraz zaman alabilir.',
|
||||||
'registered' => 'Başarıyla kaydoldunuz!',
|
'registered' => 'Başarıyla kaydoldunuz!',
|
||||||
'Default asset account' => 'Varsayılan varlık hesabı',
|
'Default asset account' => 'Varsayılan varlık hesabı',
|
||||||
'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the <a href=":link">budgets</a>-page. Budgets can help you keep track of expenses.',
|
'no_budget_pointer' => 'Henüz bütçeniz yok gibi görünüyor. <a href=":link">Bütçe</a> sayfasında bütçe oluşturun. Bütçeler giderleri takip etmenize yardımcı olabilir.',
|
||||||
'Savings account' => 'Birikim Hesabı',
|
'Savings account' => 'Birikim Hesabı',
|
||||||
'Credit card' => 'Kredi Kartı',
|
'Credit card' => 'Kredi Kartı',
|
||||||
'source_accounts' => 'Kaynak Hesap(lar)',
|
'source_accounts' => 'Kaynak Hesap(lar)',
|
||||||
@@ -184,9 +184,9 @@ return [
|
|||||||
'scopes_will_be_able' => 'Bu uygulama şunları yapabilir:',
|
'scopes_will_be_able' => 'Bu uygulama şunları yapabilir:',
|
||||||
'button_authorize' => 'İzin ver',
|
'button_authorize' => 'İzin ver',
|
||||||
'none_in_select_list' => '(Yok)',
|
'none_in_select_list' => '(Yok)',
|
||||||
'name_in_currency' => ':name in :currency',
|
'name_in_currency' => ':name :currency',
|
||||||
'paid_in_currency' => 'Paid in :currency',
|
'paid_in_currency' => ':currency olarak ödenen',
|
||||||
'unpaid_in_currency' => 'Unpaid in :currency',
|
'unpaid_in_currency' => ':currency olarak ödenmeyen',
|
||||||
|
|
||||||
// check for updates:
|
// check for updates:
|
||||||
'update_check_title' => 'Güncellemeleri kontrol et',
|
'update_check_title' => 'Güncellemeleri kontrol et',
|
||||||
@@ -231,7 +231,7 @@ return [
|
|||||||
'import_and_export' => 'İçe al ve dışarı aktar',
|
'import_and_export' => 'İçe al ve dışarı aktar',
|
||||||
'export_data' => 'Veriyi dışarı aktar',
|
'export_data' => 'Veriyi dışarı aktar',
|
||||||
'export_and_backup_data' => 'Veriyi dışarı aktar',
|
'export_and_backup_data' => 'Veriyi dışarı aktar',
|
||||||
'export_data_intro' => 'Use the exported data to move to a new financial application. Please note that these files are not meant as a backup. They do not contain enough meta-data to fully restore a new Firefly III installation. If you want to make a backup of your data, please backup the database directly.',
|
'export_data_intro' => 'Verilen veriler yeni bir mali uygulama taşımak için kullanın. Unutmayın ki bu dosyaları yedek olarak demek değildir. Tümüyle yeni bir ateş böceği III yükleme geri yüklemek için yeterli meta verileri içerdikleri değil. Verilerinizi yedeklemek istiyorsanız, lütfen doğrudan veritabanı yedekleme.',
|
||||||
'export_format' => 'Dışa Aktarma Biçimi',
|
'export_format' => 'Dışa Aktarma Biçimi',
|
||||||
'export_format_csv' => 'Virgülle ayrılmış değerler (CSV file)',
|
'export_format_csv' => 'Virgülle ayrılmış değerler (CSV file)',
|
||||||
'export_format_mt940' => 'MT940 uyumlu format',
|
'export_format_mt940' => 'MT940 uyumlu format',
|
||||||
@@ -275,8 +275,8 @@ return [
|
|||||||
'move_rule_group_up' => 'Grup kuralını yukarı taşı',
|
'move_rule_group_up' => 'Grup kuralını yukarı taşı',
|
||||||
'move_rule_group_down' => 'Grup kuralını aşağı taşı',
|
'move_rule_group_down' => 'Grup kuralını aşağı taşı',
|
||||||
'save_rules_by_moving' => 'Bu kuralları başka bir kural grubuna taşıyarak kaydedin:',
|
'save_rules_by_moving' => 'Bu kuralları başka bir kural grubuna taşıyarak kaydedin:',
|
||||||
'make_new_rule' => 'Make a new rule in rule group ":title"',
|
'make_new_rule' => '":title" kural grubunda yeni kural oluşturun',
|
||||||
'make_new_rule_no_group' => 'Make a new rule',
|
'make_new_rule_no_group' => 'Yeni bir kural ekleyin',
|
||||||
'instructions_rule_from_bill' => 'In order to match transactions to your new bill ":name", Firefly III can create a rule that will automatically be checked against any transactions you store. Please verify the details below and store the rule to have Firefly III automatically match transactions to your new bill.',
|
'instructions_rule_from_bill' => 'In order to match transactions to your new bill ":name", Firefly III can create a rule that will automatically be checked against any transactions you store. Please verify the details below and store the rule to have Firefly III automatically match transactions to your new bill.',
|
||||||
'rule_is_strict' => 'sıkı kural',
|
'rule_is_strict' => 'sıkı kural',
|
||||||
'rule_is_not_strict' => 'sıkı olmayan kural',
|
'rule_is_not_strict' => 'sıkı olmayan kural',
|
||||||
@@ -474,7 +474,7 @@ işlemlerin kontrol edildiğini lütfen unutmayın.',
|
|||||||
'pref_two_factor_auth_code' => 'Doğrulama kodu',
|
'pref_two_factor_auth_code' => 'Doğrulama kodu',
|
||||||
'pref_two_factor_auth_code_help' => 'QR kodunu, telefonunuzda Authy veya Authenticator uygulamalarında bulun ve oluşturulan kodu girin.',
|
'pref_two_factor_auth_code_help' => 'QR kodunu, telefonunuzda Authy veya Authenticator uygulamalarında bulun ve oluşturulan kodu girin.',
|
||||||
'pref_two_factor_auth_reset_code' => 'Doğrulama kodunu sıfırla',
|
'pref_two_factor_auth_reset_code' => 'Doğrulama kodunu sıfırla',
|
||||||
'pref_two_factor_auth_disable_2fa' => 'Disable 2FA',
|
'pref_two_factor_auth_disable_2fa' => '2FA\'yı kapatın',
|
||||||
'2fa_use_secret_instead' => 'If you cannot scan the QR code, feel free to use the secret instead: :secret.',
|
'2fa_use_secret_instead' => 'If you cannot scan the QR code, feel free to use the secret instead: :secret.',
|
||||||
'pref_save_settings' => 'Ayarları kaydet',
|
'pref_save_settings' => 'Ayarları kaydet',
|
||||||
'saved_preferences' => 'Tercihler kaydedildi!',
|
'saved_preferences' => 'Tercihler kaydedildi!',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<base href="{{ route('index') }}/">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class AboutControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class AccountControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
|||||||
use FireflyIII\Models\Attachment;
|
use FireflyIII\Models\Attachment;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use Laravel\Passport\Passport;
|
use Laravel\Passport\Passport;
|
||||||
use Log;
|
use Log;
|
||||||
@@ -45,7 +46,7 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,6 +58,7 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
$repository->shouldReceive('destroy')->once()->andReturn(true);
|
$repository->shouldReceive('destroy')->once()->andReturn(true);
|
||||||
@@ -78,6 +80,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$content = 'Attachment content ' . random_int(100, 1000);
|
$content = 'Attachment content ' . random_int(100, 1000);
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -99,12 +103,13 @@ class AttachmentControllerTest extends TestCase
|
|||||||
* Download attachment but file doesn't exist.
|
* Download attachment but file doesn't exist.
|
||||||
*
|
*
|
||||||
* @covers \FireflyIII\Api\V1\Controllers\AttachmentController
|
* @covers \FireflyIII\Api\V1\Controllers\AttachmentController
|
||||||
* @expectedExceptionMessage Some error message
|
|
||||||
*/
|
*/
|
||||||
public function testDownloadNotExisting(): void
|
public function testDownloadNotExisting(): void
|
||||||
{
|
{
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$content = 'Attachment content ' . random_int(100, 1000);
|
$content = 'Attachment content ' . random_int(100, 1000);
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -129,6 +134,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
|
|
||||||
@@ -166,6 +173,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
|
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -192,6 +201,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
|
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -219,6 +230,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -254,6 +267,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock repositories
|
// mock repositories
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
/** @var Attachment $attachment */
|
/** @var Attachment $attachment */
|
||||||
$attachment = $this->user()->attachments()->first();
|
$attachment = $this->user()->attachments()->first();
|
||||||
@@ -287,6 +302,11 @@ class AttachmentControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpload(): void
|
public function testUpload(): void
|
||||||
{
|
{
|
||||||
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$repository->shouldReceive('setUser')->once();
|
||||||
|
|
||||||
|
|
||||||
/** @var Attachment $attachment */
|
/** @var Attachment $attachment */
|
||||||
$attachment = $this->user()->attachments()->first();
|
$attachment = $this->user()->attachments()->first();
|
||||||
$content = 'Hello there';
|
$content = 'Hello there';
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class AvailableBudgetControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class BillControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class BudgetControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class BudgetLimitControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CategoryControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,8 +25,10 @@ namespace Tests\Api\V1\Controllers;
|
|||||||
|
|
||||||
use FireflyConfig;
|
use FireflyConfig;
|
||||||
use FireflyIII\Models\Configuration;
|
use FireflyIII\Models\Configuration;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Laravel\Passport\Passport;
|
use Laravel\Passport\Passport;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +44,7 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,6 +54,9 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$demoConfig = new Configuration;
|
$demoConfig = new Configuration;
|
||||||
$demoConfig->name = 'is_demo_site';
|
$demoConfig->name = 'is_demo_site';
|
||||||
$demoConfig->data = false;
|
$demoConfig->data = false;
|
||||||
@@ -96,6 +101,9 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndexNotOwner(): void
|
public function testIndexNotOwner(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
Passport::actingAs($this->emptyUser());
|
Passport::actingAs($this->emptyUser());
|
||||||
$response = $this->get('/api/v1/configuration');
|
$response = $this->get('/api/v1/configuration');
|
||||||
$response->assertStatus(500);
|
$response->assertStatus(500);
|
||||||
@@ -109,7 +117,9 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdate(): void
|
public function testUpdate(): void
|
||||||
{
|
{
|
||||||
$data = [
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$data = [
|
||||||
'name' => 'permission_update_check',
|
'name' => 'permission_update_check',
|
||||||
'value' => 1,
|
'value' => 1,
|
||||||
|
|
||||||
@@ -159,6 +169,9 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateBoolean(): void
|
public function testUpdateBoolean(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'single_user_mode',
|
'name' => 'single_user_mode',
|
||||||
'value' => 'true',
|
'value' => 'true',
|
||||||
@@ -209,6 +222,8 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateInvalid(): void
|
public function testUpdateInvalid(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'last_update_check',
|
'name' => 'last_update_check',
|
||||||
'value' => 'true',
|
'value' => 'true',
|
||||||
@@ -225,6 +240,9 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateNotOwner(): void
|
public function testUpdateNotOwner(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
Passport::actingAs($this->emptyUser());
|
Passport::actingAs($this->emptyUser());
|
||||||
$response = $this->post('/api/v1/configuration');
|
$response = $this->post('/api/v1/configuration');
|
||||||
$response->assertStatus(500);
|
$response->assertStatus(500);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
$collection = TransactionCurrency::get();
|
$collection = TransactionCurrency::get();
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -125,6 +126,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
// create stuff
|
// create stuff
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -152,6 +154,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
|
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -182,8 +185,10 @@ class CurrencyControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStoreWithDefault(): void
|
public function testStoreWithDefault(): void
|
||||||
{
|
{
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$preference = new Preference;
|
$preference = new Preference;
|
||||||
$preference->data = 'EUR';
|
$preference->data = 'EUR';
|
||||||
// mock calls:
|
// mock calls:
|
||||||
@@ -221,6 +226,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -253,6 +259,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$preference = new Preference;
|
$preference = new Preference;
|
||||||
$preference->data = 'EUR';
|
$preference->data = 'EUR';
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class CurrencyExchangeRateControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class JournalLinkControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class LinkTypeControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class PreferencesControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,12 +29,17 @@ use FireflyIII\Models\AccountType;
|
|||||||
use FireflyIII\Models\Recurrence;
|
use FireflyIII\Models\Recurrence;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Laravel\Passport\Passport;
|
use Laravel\Passport\Passport;
|
||||||
use Log;
|
use Log;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Class RecurrenceControllerTest
|
||||||
|
*/
|
||||||
class RecurrenceControllerTest extends TestCase
|
class RecurrenceControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +49,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +59,9 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
public function testDelete(): void
|
public function testDelete(): void
|
||||||
{
|
{
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(RecurringRepositoryInterface::class);
|
$repository = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
@@ -77,7 +84,15 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$recurrences = $this->user()->recurrences()->get();
|
$recurrences = $this->user()->recurrences()->get();
|
||||||
|
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(RecurringRepositoryInterface::class);
|
$repository = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
$budgetRepos->shouldReceive('findNull')->atLeast()->once()->withAnyArgs()
|
||||||
|
->andReturn($this->user()->budgets()->first());
|
||||||
|
|
||||||
|
$piggyRepos->shouldReceive('findNull')->atLeast()->once()->withAnyArgs()
|
||||||
|
->andReturn($this->user()->piggyBanks()->first());
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser');
|
$repository->shouldReceive('setUser');
|
||||||
@@ -103,7 +118,12 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$recurrence = $this->user()->recurrences()->first();
|
$recurrence = $this->user()->recurrences()->first();
|
||||||
|
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$repository = $this->mock(RecurringRepositoryInterface::class);
|
$repository = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
$budgetRepos->shouldReceive('findNull')->atLeast()->once()->withAnyArgs()
|
||||||
|
->andReturn($this->user()->budgets()->first());
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser');
|
$repository->shouldReceive('setUser');
|
||||||
@@ -134,6 +154,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -211,6 +232,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
@@ -287,7 +310,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
@@ -366,6 +389,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
$expenseAccount = $this->user()->accounts()->where('account_type_id', 4)->first();
|
$expenseAccount = $this->user()->accounts()->where('account_type_id', 4)->first();
|
||||||
@@ -447,6 +472,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
$expenseAccount = $this->user()->accounts()->where('account_type_id', 4)->first();
|
$expenseAccount = $this->user()->accounts()->where('account_type_id', 4)->first();
|
||||||
@@ -526,6 +552,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -617,6 +644,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
@@ -691,6 +720,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -764,6 +795,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -851,6 +883,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -924,6 +957,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -997,6 +1031,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -1070,6 +1106,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -1143,6 +1180,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -1216,6 +1254,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser');
|
$repository->shouldReceive('setUser');
|
||||||
@@ -1286,6 +1325,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser');
|
$repository->shouldReceive('setUser');
|
||||||
@@ -1359,6 +1399,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setUser');
|
$repository->shouldReceive('setUser');
|
||||||
@@ -1436,6 +1477,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -1501,6 +1543,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
@@ -1564,6 +1607,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
$otherAssetAccount = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $assetAccount->id)->first();
|
$otherAssetAccount = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $assetAccount->id)->first();
|
||||||
@@ -1644,6 +1688,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
$factory = $this->mock(CategoryFactory::class);
|
$factory = $this->mock(CategoryFactory::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
$assetAccount = $this->user()->accounts()->where('account_type_id', 3)->first();
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class RuleControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class TransactionControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class UserControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Passport::actingAs($this->user());
|
Passport::actingAs($this->user());
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,13 +56,13 @@ class UserControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testDelete(): void
|
public function testDelete(): void
|
||||||
{
|
{
|
||||||
|
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$userRepository->shouldReceive('destroy')->once();
|
||||||
// create a user first:
|
// create a user first:
|
||||||
$user = User::create(['email' => 'some@newu' . random_int(1, 10000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);
|
|
||||||
|
|
||||||
// call API
|
// call API
|
||||||
$response = $this->delete('/api/v1/users/' . $user->id);
|
$response = $this->delete('/api/v1/users/' . $this->user()->id);
|
||||||
$response->assertStatus(204);
|
$response->assertStatus(204);
|
||||||
$this->assertDatabaseMissing('users', ['id' => $user->id]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,6 +73,8 @@ class UserControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testDeleteNoAdmin(): void
|
public function testDeleteNoAdmin(): void
|
||||||
{
|
{
|
||||||
|
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(false);
|
||||||
Passport::actingAs($this->emptyUser());
|
Passport::actingAs($this->emptyUser());
|
||||||
|
|
||||||
// create a user first:
|
// create a user first:
|
||||||
|
|||||||
@@ -33,9 +33,10 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use Mockery;
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Class CreateControllerTest
|
* Class CreateControllerTest
|
||||||
@@ -48,7 +49,7 @@ class CreateControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ class CreateControllerTest extends TestCase
|
|||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
// get all types:
|
// get all types:
|
||||||
$accountRepos->shouldReceive('getAccountTypeByType')->withArgs(['Debt'])->andReturn(AccountType::find(11))->once();
|
$accountRepos->shouldReceive('getAccountTypeByType')->withArgs(['Debt'])->andReturn(AccountType::find(11))->once();
|
||||||
@@ -90,8 +91,8 @@ class CreateControllerTest extends TestCase
|
|||||||
public function testStore(): void
|
public function testStore(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
@@ -119,8 +120,8 @@ class CreateControllerTest extends TestCase
|
|||||||
public function testStoreAnother(): void
|
public function testStoreAnother(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ namespace Tests\Feature\Controllers\Account;
|
|||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -47,7 +46,7 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,14 +56,14 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function testDelete(): void
|
public function testDelete(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository->shouldReceive('getAccountsByType')->withArgs([[AccountType::ASSET]])->andReturn(new Collection);
|
$repository->shouldReceive('getAccountsByType')->withArgs([[AccountType::ASSET]])->andReturn(new Collection);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$account = $this->user()->accounts()->where('account_type_id', 3)->whereNull('deleted_at')->first();
|
$account = $this->user()->accounts()->where('account_type_id', 3)->whereNull('deleted_at')->first();
|
||||||
@@ -81,8 +80,8 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function testDestroy(): void
|
public function testDestroy(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository->shouldReceive('findNull')->withArgs([0])->once()->andReturn(null);
|
$repository->shouldReceive('findNull')->withArgs([0])->once()->andReturn(null);
|
||||||
$repository->shouldReceive('destroy')->andReturn(true);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class EditControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,10 +57,10 @@ class EditControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEdit(): void
|
public function testEdit(): void
|
||||||
{
|
{
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
$repository->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
@@ -103,10 +103,10 @@ class EditControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEditLiability(): void
|
public function testEditLiability(): void
|
||||||
{
|
{
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
@@ -149,10 +149,10 @@ class EditControllerTest extends TestCase
|
|||||||
public function testEditNull(): void
|
public function testEditNull(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class IndexControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ class IndexControllerTest extends TestCase
|
|||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$repository->shouldReceive('getAccountsByType')->andReturn(new Collection([$account]));
|
$repository->shouldReceive('getAccountsByType')->andReturn(new Collection([$account]));
|
||||||
$repository->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
|
$repository->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ReconcileControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,9 +106,12 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testReconcile(): void
|
public function testReconcile(): void
|
||||||
{
|
{
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')
|
||||||
|
->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
@@ -129,6 +132,10 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testReconcileInitialBalance(): void
|
public function testReconcileInitialBalance(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||||
->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);
|
->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -143,9 +150,12 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testReconcileNoDates(): void
|
public function testReconcileNoDates(): void
|
||||||
{
|
{
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')
|
||||||
|
->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
@@ -167,9 +177,12 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testReconcileNoEndDate(): void
|
public function testReconcileNoEndDate(): void
|
||||||
{
|
{
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')
|
||||||
|
->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
@@ -207,15 +220,19 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testShow(): void
|
public function testShow(): void
|
||||||
{
|
{
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(JournalRepositoryInterface::class);
|
$repository = $this->mock(JournalRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')
|
||||||
|
->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->atLeast()->once()->withArgs([1])->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
||||||
|
|
||||||
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('getAssetTransaction')->once()->andReturn($journal->transactions()->first());
|
$repository->shouldReceive('getAssetTransaction')->once()->andReturn($journal->transactions()->first());
|
||||||
@@ -238,9 +255,9 @@ class ReconcileControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$repository = $this->mock(JournalRepositoryInterface::class);
|
$repository = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
|
||||||
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
||||||
|
|
||||||
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('getAssetTransaction')->once()->andReturnNull();
|
$repository->shouldReceive('getAssetTransaction')->once()->andReturnNull();
|
||||||
@@ -279,8 +296,8 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmit(): void
|
public function testSubmit(): void
|
||||||
{
|
{
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
@@ -310,7 +327,7 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdate(): void
|
public function testUpdate(): void
|
||||||
{
|
{
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
@@ -336,6 +353,9 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateNotReconcile(): void
|
public function testUpdateNotReconcile(): void
|
||||||
{
|
{
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journal = $this->user()->transactionJournals()->where('transaction_type_id', '!=', 5)->first();
|
$journal = $this->user()->transactionJournals()->where('transaction_type_id', '!=', 5)->first();
|
||||||
$data = ['amount' => '5',];
|
$data = ['amount' => '5',];
|
||||||
|
|
||||||
@@ -351,6 +371,9 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateZero(): void
|
public function testUpdateZero(): void
|
||||||
{
|
{
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();
|
||||||
$data = ['amount' => '0',];
|
$data = ['amount' => '0',];
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ShowControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -67,13 +67,15 @@ class ShowControllerTest extends TestCase
|
|||||||
$this->session(['start' => $date, 'end' => clone $date]);
|
$this->session(['start' => $date, 'end' => clone $date]);
|
||||||
|
|
||||||
// mock stuff:
|
// mock stuff:
|
||||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
@@ -121,10 +123,11 @@ class ShowControllerTest extends TestCase
|
|||||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
@@ -159,12 +162,16 @@ class ShowControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Account\ShowController
|
* @covers \FireflyIII\Http\Controllers\Account\ShowController
|
||||||
* @expectedExceptionMessage End is after start!
|
|
||||||
*/
|
*/
|
||||||
public function testShowBrokenBadDates(): void
|
public function testShowBrokenBadDates(): void
|
||||||
{
|
{
|
||||||
// mock
|
// mock
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('isLiability')->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$this->session(['start' => '2018-01-01', 'end' => '2017-12-01']);
|
$this->session(['start' => '2018-01-01', 'end' => '2017-12-01']);
|
||||||
|
|
||||||
@@ -172,6 +179,7 @@ class ShowControllerTest extends TestCase
|
|||||||
$account = $this->user()->accounts()->where('account_type_id', 3)->orderBy('id', 'ASC')->whereNull('deleted_at')->first();
|
$account = $this->user()->accounts()->where('account_type_id', 3)->orderBy('id', 'ASC')->whereNull('deleted_at')->first();
|
||||||
$response = $this->get(route('accounts.show', [$account->id, '2018-01-01', '2017-12-01']));
|
$response = $this->get(route('accounts.show', [$account->id, '2018-01-01', '2017-12-01']));
|
||||||
$response->assertStatus(500);
|
$response->assertStatus(500);
|
||||||
|
$response->assertSee('End is after start!');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,6 +189,9 @@ class ShowControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock
|
// mock
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$date = new Carbon;
|
$date = new Carbon;
|
||||||
$this->session(['start' => $date, 'end' => clone $date]);
|
$this->session(['start' => $date, 'end' => clone $date]);
|
||||||
@@ -209,7 +220,7 @@ class ShowControllerTest extends TestCase
|
|||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
// mock hasRole for user repository:
|
// mock hasRole for user repository:
|
||||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(),'owner'])->andReturn(true)->atLeast()->once();
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
@@ -244,6 +255,8 @@ class ShowControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$date = new Carbon;
|
$date = new Carbon;
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ namespace Tests\Feature\Controllers\Admin;
|
|||||||
|
|
||||||
use FireflyConfig;
|
use FireflyConfig;
|
||||||
use FireflyIII\Models\Configuration;
|
use FireflyIII\Models\Configuration;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +40,7 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,8 +49,11 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
|
$this->be($this->user());
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
|
|
||||||
@@ -70,6 +75,11 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostIndex(): void
|
public function testPostIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ namespace Tests\Feature\Controllers\Admin;
|
|||||||
|
|
||||||
use Event;
|
use Event;
|
||||||
use FireflyIII\Events\AdminRequestedTestMessage;
|
use FireflyIII\Events\AdminRequestedTestMessage;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +40,7 @@ class HomeControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,6 +48,10 @@ class HomeControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('admin.index'));
|
$response = $this->get(route('admin.index'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -58,6 +64,11 @@ class HomeControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testTestMessage(): void
|
public function testTestMessage(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
Event::fake();
|
Event::fake();
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ namespace Tests\Feature\Controllers\Admin;
|
|||||||
|
|
||||||
use FireflyIII\Models\LinkType;
|
use FireflyIII\Models\LinkType;
|
||||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +41,7 @@ class LinkControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +49,10 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testCreate(): void
|
public function testCreate(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('admin.links.create'));
|
$response = $this->get(route('admin.links.create'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -58,10 +63,14 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testDeleteEditable(): void
|
public function testDeleteEditable(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
// create editable link type just in case:
|
// create editable link type just in case:
|
||||||
LinkType::create(['editable' => 1, 'inward' => 'hello', 'outward' => 'bye', 'name' => 'Test type']);
|
LinkType::create(['editable' => 1, 'inward' => 'hello', 'outward' => 'bye', 'name' => 'Test type']);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$linkType = LinkType::where('editable', 1)->first();
|
$linkType = LinkType::where('editable', 1)->first();
|
||||||
$repository->shouldReceive('get')->once()->andReturn(new Collection([$linkType]));
|
$repository->shouldReceive('get')->once()->andReturn(new Collection([$linkType]));
|
||||||
$repository->shouldReceive('countJournals')->andReturn(2);
|
$repository->shouldReceive('countJournals')->andReturn(2);
|
||||||
@@ -75,8 +84,12 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testDeleteNonEditable(): void
|
public function testDeleteNonEditable(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
$linkType = LinkType::where('editable', 0)->first();
|
$linkType = LinkType::where('editable', 0)->first();
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('admin.links.delete', [$linkType->id]));
|
$response = $this->get(route('admin.links.delete', [$linkType->id]));
|
||||||
$response->assertStatus(302);
|
$response->assertStatus(302);
|
||||||
@@ -88,8 +101,12 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testDestroy(): void
|
public function testDestroy(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
// create editable link type just in case:
|
// create editable link type just in case:
|
||||||
LinkType::create(['editable' => 1, 'inward' => 'hellox', 'outward' => 'byex', 'name' => 'Test typeX']);
|
LinkType::create(['editable' => 1, 'inward' => 'hellox', 'outward' => 'byex', 'name' => 'Test typeX']);
|
||||||
|
|
||||||
@@ -108,6 +125,11 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEditEditable(): void
|
public function testEditEditable(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
// create editable link type just in case:
|
// create editable link type just in case:
|
||||||
LinkType::create(['editable' => 1, 'inward' => 'hello Y', 'outward' => 'bye Y', 'name' => 'Test type Y']);
|
LinkType::create(['editable' => 1, 'inward' => 'hello Y', 'outward' => 'bye Y', 'name' => 'Test type Y']);
|
||||||
|
|
||||||
@@ -122,6 +144,11 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEditNonEditable(): void
|
public function testEditNonEditable(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$linkType = LinkType::where('editable', 0)->first();
|
$linkType = LinkType::where('editable', 0)->first();
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('admin.links.edit', [$linkType->id]));
|
$response = $this->get(route('admin.links.edit', [$linkType->id]));
|
||||||
@@ -134,6 +161,11 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
|
|
||||||
$linkTypes = LinkType::inRandomOrder()->take(3)->get();
|
$linkTypes = LinkType::inRandomOrder()->take(3)->get();
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
$repository->shouldReceive('get')->andReturn($linkTypes);
|
$repository->shouldReceive('get')->andReturn($linkTypes);
|
||||||
@@ -148,6 +180,11 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testShow(): void
|
public function testShow(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
|
|
||||||
$linkType = LinkType::first();
|
$linkType = LinkType::first();
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('admin.links.show', [$linkType->id]));
|
$response = $this->get(route('admin.links.show', [$linkType->id]));
|
||||||
@@ -160,8 +197,13 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStore(): void
|
public function testStore(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
$data = [
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
|
$data = [
|
||||||
'name' => 'test ' . random_int(1, 10000),
|
'name' => 'test ' . random_int(1, 10000),
|
||||||
'inward' => 'test inward' . random_int(1, 10000),
|
'inward' => 'test inward' . random_int(1, 10000),
|
||||||
'outward' => 'test outward' . random_int(1, 10000),
|
'outward' => 'test outward' . random_int(1, 10000),
|
||||||
@@ -182,8 +224,13 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStoreRedirect(): void
|
public function testStoreRedirect(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
$data = [
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
|
$data = [
|
||||||
'name' => 'test ' . random_int(1, 10000),
|
'name' => 'test ' . random_int(1, 10000),
|
||||||
'inward' => 'test inward' . random_int(1, 10000),
|
'inward' => 'test inward' . random_int(1, 10000),
|
||||||
'outward' => 'test outward' . random_int(1, 10000),
|
'outward' => 'test outward' . random_int(1, 10000),
|
||||||
@@ -203,8 +250,12 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdate(): void
|
public function testUpdate(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
// create editable link type just in case:
|
// create editable link type just in case:
|
||||||
$linkType = LinkType::create(['editable' => 1, 'inward' => 'helloxz', 'outward' => 'bzyex', 'name' => 'Test tyzpeX']);
|
$linkType = LinkType::create(['editable' => 1, 'inward' => 'helloxz', 'outward' => 'bzyex', 'name' => 'Test tyzpeX']);
|
||||||
$repository->shouldReceive('update')->once()->andReturn(new $linkType);
|
$repository->shouldReceive('update')->once()->andReturn(new $linkType);
|
||||||
@@ -227,8 +278,13 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateNonEditable(): void
|
public function testUpdateNonEditable(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
$linkType = LinkType::where('editable', 0)->first();
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
|
$linkType = LinkType::where('editable', 0)->first();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'test ' . random_int(1, 10000),
|
'name' => 'test ' . random_int(1, 10000),
|
||||||
@@ -249,7 +305,12 @@ class LinkControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateRedirect(): void
|
public function testUpdateRedirect(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
// create editable link type just in case:
|
// create editable link type just in case:
|
||||||
$linkType = LinkType::create(['editable' => 1, 'inward' => 'healox', 'outward' => 'byaex', 'name' => 'Test tyapeX']);
|
$linkType = LinkType::create(['editable' => 1, 'inward' => 'healox', 'outward' => 'byaex', 'name' => 'Test tyapeX']);
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ use Carbon\Carbon;
|
|||||||
use FireflyConfig;
|
use FireflyConfig;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\Configuration;
|
use FireflyIII\Models\Configuration;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use FireflyIII\Services\Github\Object\Release;
|
use FireflyIII\Services\Github\Object\Release;
|
||||||
use FireflyIII\Services\Github\Request\UpdateRequest;
|
use FireflyIII\Services\Github\Request\UpdateRequest;
|
||||||
use Log;
|
use Log;
|
||||||
@@ -43,7 +44,7 @@ class UpdateControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,6 +52,10 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|
||||||
$config = new Configuration;
|
$config = new Configuration;
|
||||||
@@ -74,6 +79,11 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPost(): void
|
public function testPost(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
|
|
||||||
@@ -93,6 +103,11 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateCheck(): void
|
public function testUpdateCheck(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
@@ -123,6 +138,11 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateCheckCurrent(): void
|
public function testUpdateCheckCurrent(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
@@ -151,6 +171,11 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateCheckError(): void
|
public function testUpdateCheckError(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
@@ -174,6 +199,11 @@ class UpdateControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testUpdateCheckNewer(): void
|
public function testUpdateCheckNewer(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false)->atLeast()->once();
|
||||||
|
|
||||||
$falseConfig = new Configuration;
|
$falseConfig = new Configuration;
|
||||||
$falseConfig->data = false;
|
$falseConfig->data = false;
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class UserControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,8 +26,10 @@ use FireflyIII\Models\Attachment;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +47,7 @@ class AttachmentControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +58,10 @@ class AttachmentControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$attachRepository = $this->mock(AttachmentRepositoryInterface::class);
|
$attachRepository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('attachments.delete', [1]));
|
$response = $this->get(route('attachments.delete', [1]));
|
||||||
@@ -72,6 +78,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('destroy')->andReturn(true);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -90,6 +98,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('exists')->once()->andReturn(true);
|
$repository->shouldReceive('exists')->once()->andReturn(true);
|
||||||
$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');
|
$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
@@ -103,13 +113,14 @@ class AttachmentControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\AttachmentController
|
* @covers \FireflyIII\Http\Controllers\AttachmentController
|
||||||
* @expectedExceptionMessage Could not find the indicated attachment
|
|
||||||
*/
|
*/
|
||||||
public function testDownloadFail(): void
|
public function testDownloadFail(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('exists')->once()->andReturn(false);
|
$repository->shouldReceive('exists')->once()->andReturn(false);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -125,6 +136,10 @@ class AttachmentControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$attachRepository = $this->mock(AttachmentRepositoryInterface::class);
|
$attachRepository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$attachRepository->shouldReceive('getNoteText')->andReturn('OK');
|
$attachRepository->shouldReceive('getNoteText')->andReturn('OK');
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -140,6 +155,9 @@ class AttachmentControllerTest extends TestCase
|
|||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$repository->shouldReceive('get')->andReturn(new Collection([Attachment::first()]))->once();
|
$repository->shouldReceive('get')->andReturn(new Collection([Attachment::first()]))->once();
|
||||||
$repository->shouldReceive('exists')->andReturn(true)->once();
|
$repository->shouldReceive('exists')->andReturn(true)->once();
|
||||||
|
|
||||||
@@ -159,6 +177,8 @@ class AttachmentControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('update')->once();
|
$repository->shouldReceive('update')->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -181,11 +201,14 @@ class AttachmentControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testView(): void
|
public function testView(): void
|
||||||
{
|
{
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('exists')->once()->andReturn(true);
|
$repository->shouldReceive('exists')->once()->andReturn(true);
|
||||||
$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');
|
$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');
|
||||||
|
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('attachments.view', [3]));
|
$response = $this->get(route('attachments.view', [3]));
|
||||||
@@ -198,10 +221,13 @@ class AttachmentControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testViewFail(): void
|
public function testViewFail(): void
|
||||||
{
|
{
|
||||||
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
$repository = $this->mock(AttachmentRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('exists')->once()->andReturn(false);
|
$repository->shouldReceive('exists')->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('attachments.view', [1]));
|
$response = $this->get(route('attachments.view', [1]));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class ForgotPasswordControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,7 +89,6 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController
|
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController
|
||||||
* @expectedExceptionMessage Your two factor authentication secret is empty
|
|
||||||
*/
|
*/
|
||||||
public function testIndexNoSecret(): void
|
public function testIndexNoSecret(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,8 +29,10 @@ use FireflyIII\Models\Bill;
|
|||||||
use FireflyIII\Models\Rule;
|
use FireflyIII\Models\Rule;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use FireflyIII\TransactionRules\TransactionMatcher;
|
use FireflyIII\TransactionRules\TransactionMatcher;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -54,7 +56,7 @@ class BillControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -67,6 +69,12 @@ class BillControllerTest extends TestCase
|
|||||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -85,6 +93,11 @@ class BillControllerTest extends TestCase
|
|||||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -104,6 +117,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('destroy')->andReturn(true);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -123,6 +139,12 @@ class BillControllerTest extends TestCase
|
|||||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$billRepos->shouldReceive('getNoteText')->andReturn('Hello');
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -144,6 +166,10 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$collection = new Collection([$bill]);
|
$collection = new Collection([$bill]);
|
||||||
$repository->shouldReceive('getPaginator')->andReturn(new LengthAwarePaginator($collection, 1, 50))->once();
|
$repository->shouldReceive('getPaginator')->andReturn(new LengthAwarePaginator($collection, 1, 50))->once();
|
||||||
@@ -171,10 +197,14 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('getRulesForBill')->andReturn(new Collection([$rule]));
|
$repository->shouldReceive('getRulesForBill')->andReturn(new Collection([$rule]));
|
||||||
|
|
||||||
//calls for transaction matcher:
|
//calls for transaction matcher:
|
||||||
|
// todo bad to do this:
|
||||||
$matcher = $this->mock(TransactionMatcher::class);
|
$matcher = $this->mock(TransactionMatcher::class);
|
||||||
$matcher->shouldReceive('setLimit')->once()->withArgs([100000]);
|
$matcher->shouldReceive('setLimit')->once()->withArgs([100000]);
|
||||||
$matcher->shouldReceive('setRange')->once()->withArgs([100000]);
|
$matcher->shouldReceive('setRange')->once()->withArgs([100000]);
|
||||||
@@ -199,6 +229,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -218,6 +251,10 @@ class BillControllerTest extends TestCase
|
|||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$repository->shouldReceive('getYearAverage')->andReturn('0');
|
$repository->shouldReceive('getYearAverage')->andReturn('0');
|
||||||
$repository->shouldReceive('getOverallAverage')->andReturn('0');
|
$repository->shouldReceive('getOverallAverage')->andReturn('0');
|
||||||
$repository->shouldReceive('nextExpectedMatch')->andReturn(new Carbon);
|
$repository->shouldReceive('nextExpectedMatch')->andReturn(new Carbon);
|
||||||
@@ -255,6 +292,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('store')->andReturn($bill);
|
$repository->shouldReceive('store')->andReturn($bill);
|
||||||
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
||||||
@@ -289,7 +329,10 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
$bill = $this->user()->bills()->first();
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$bill = $this->user()->bills()->first();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('store')->andReturn($bill);
|
$repository->shouldReceive('store')->andReturn($bill);
|
||||||
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
||||||
@@ -325,6 +368,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('store')->andReturn(null);
|
$repository->shouldReceive('store')->andReturn(null);
|
||||||
|
|
||||||
@@ -357,6 +403,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('store')->andReturn(new Bill);
|
$repository->shouldReceive('store')->andReturn(new Bill);
|
||||||
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
||||||
@@ -392,6 +441,9 @@ class BillControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BillRepositoryInterface::class);
|
$repository = $this->mock(BillRepositoryInterface::class);
|
||||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('update')->andReturn(new Bill);
|
$repository->shouldReceive('update')->andReturn(new Bill);
|
||||||
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
$attachHelper->shouldReceive('saveAttachmentsForModel');
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class AmountControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ use FireflyIII\Models\Budget;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +45,7 @@ class CreateControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +58,9 @@ class CreateControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -76,6 +81,8 @@ class CreateControllerTest extends TestCase
|
|||||||
$budget = factory(Budget::class)->make();
|
$budget = factory(Budget::class)->make();
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('findNull')->andReturn($budget);
|
$repository->shouldReceive('findNull')->andReturn($budget);
|
||||||
$repository->shouldReceive('store')->andReturn($budget);
|
$repository->shouldReceive('store')->andReturn($budget);
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ namespace Tests\Feature\Controllers\Budget;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,7 +43,7 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -54,6 +56,9 @@ class DeleteControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -72,6 +77,8 @@ class DeleteControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$repository->shouldReceive('destroy')->andReturn(true);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ use FireflyIII\Models\Budget;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +44,7 @@ class EditControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +57,9 @@ class EditControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -75,6 +80,8 @@ class EditControllerTest extends TestCase
|
|||||||
$budget = factory(Budget::class)->make();
|
$budget = factory(Budget::class)->make();
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('findNull')->andReturn($budget);
|
$repository->shouldReceive('findNull')->andReturn($budget);
|
||||||
$repository->shouldReceive('update');
|
$repository->shouldReceive('update');
|
||||||
|
|||||||
@@ -30,8 +30,10 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +48,7 @@ class IndexControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,6 +59,8 @@ class IndexControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(string $range): void
|
public function testIndex(string $range): void
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Log::debug(sprintf('Now in testIndex(%s)', $range));
|
Log::debug(sprintf('Now in testIndex(%s)', $range));
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$budget = factory(Budget::class)->make();
|
$budget = factory(Budget::class)->make();
|
||||||
@@ -76,6 +80,9 @@ class IndexControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
|
|
||||||
@@ -122,6 +129,9 @@ class IndexControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
|
|
||||||
@@ -170,6 +180,9 @@ class IndexControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
|
|
||||||
@@ -216,6 +229,8 @@ class IndexControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +49,7 @@ class ShowControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -66,8 +68,10 @@ class ShowControllerTest extends TestCase
|
|||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
|
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
$collector->shouldReceive('getTransactions')->andReturn(new Collection);
|
$collector->shouldReceive('getTransactions')->andReturn(new Collection);
|
||||||
@@ -102,8 +106,10 @@ class ShowControllerTest extends TestCase
|
|||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||||
@@ -139,6 +145,9 @@ class ShowControllerTest extends TestCase
|
|||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
$journalRepos->shouldReceive('firstNull')->andReturn(null);
|
||||||
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
@@ -177,9 +186,15 @@ class ShowControllerTest extends TestCase
|
|||||||
$budgetLimit = factory(BudgetLimit::class)->make();
|
$budgetLimit = factory(BudgetLimit::class)->make();
|
||||||
|
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||||
@@ -188,10 +203,10 @@ class ShowControllerTest extends TestCase
|
|||||||
$collector->shouldReceive('getPaginatedTransactions')->andReturn(new LengthAwarePaginator([], 0, 10));
|
$collector->shouldReceive('getPaginatedTransactions')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||||
|
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
|
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
|
||||||
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection([$budgetLimit]));
|
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection([$budgetLimit]));
|
||||||
$repository->shouldReceive('spentInPeriod')->andReturn('-1');
|
$repository->shouldReceive('spentInPeriod')->andReturn('-1');
|
||||||
|
|
||||||
@@ -208,7 +223,6 @@ class ShowControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Budget\ShowController
|
* @covers \FireflyIII\Http\Controllers\Budget\ShowController
|
||||||
* @expectedExceptionMessage This budget limit is not part of
|
|
||||||
*/
|
*/
|
||||||
public function testShowByBadBudgetLimit(): void
|
public function testShowByBadBudgetLimit(): void
|
||||||
{
|
{
|
||||||
@@ -216,6 +230,8 @@ class ShowControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -233,20 +249,17 @@ class ShowControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
Log::debug(sprintf('Now in testShowByBudgetLimit(%s)', $range));
|
Log::debug(sprintf('Now in testShowByBudgetLimit(%s)', $range));
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
|
||||||
|
|
||||||
// mock account repository
|
|
||||||
$accountRepository = $this->mock(AccountRepositoryInterface::class);
|
$accountRepository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$accountRepository->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock budget repository
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
$accountRepository->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||||
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
||||||
$budgetRepository->shouldReceive('getBudgetLimits')->andReturn(new Collection);
|
$budgetRepository->shouldReceive('getBudgetLimits')->andReturn(new Collection);
|
||||||
|
|
||||||
// mock journal collector:
|
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||||
|
|||||||
@@ -31,9 +31,11 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Navigation;
|
use Navigation;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@@ -49,7 +51,7 @@ class NoCategoryControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -61,17 +63,18 @@ class NoCategoryControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNoCategory(string $range): void
|
public function testNoCategory(string $range): void
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Test noCategory(%s)', $range));
|
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// get the journal with the most recent date for firstNull:
|
// get the journal with the most recent date for firstNull:
|
||||||
$journal = $this->user()->transactionJournals()->orderBy('date', 'DESC')->first();
|
$journal = $this->user()->transactionJournals()->orderBy('date', 'DESC')->first();
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($journal);
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($journal);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setTypes')->andReturnSelf();
|
$collector->shouldReceive('setTypes')->andReturnSelf();
|
||||||
@@ -108,7 +111,9 @@ class NoCategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setTypes')->andReturnSelf();
|
$collector->shouldReceive('setTypes')->andReturnSelf();
|
||||||
@@ -144,7 +149,10 @@ class NoCategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||||
|
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setTypes')->andReturnSelf();
|
$collector->shouldReceive('setTypes')->andReturnSelf();
|
||||||
|
|||||||
@@ -32,9 +32,11 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Navigation;
|
use Navigation;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@@ -50,7 +52,7 @@ class ShowControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,6 +69,11 @@ class ShowControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
|
||||||
|
|
||||||
// mock stuff
|
// mock stuff
|
||||||
@@ -119,6 +126,9 @@ class ShowControllerTest extends TestCase
|
|||||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$collector->shouldReceive('setPage')->andReturnSelf()->once();
|
$collector->shouldReceive('setPage')->andReturnSelf()->once();
|
||||||
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
||||||
@@ -157,7 +167,11 @@ class ShowControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$month = new Carbon();
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
|
$month = new Carbon();
|
||||||
$month->startOfMonth();
|
$month->startOfMonth();
|
||||||
$journal = TransactionJournal::where('date', '>=', $month->format('Y-m-d') . ' 00:00:00')->first();
|
$journal = TransactionJournal::where('date', '>=', $month->format('Y-m-d') . ' 00:00:00')->first();
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($journal);
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($journal);
|
||||||
@@ -201,19 +215,20 @@ class ShowControllerTest extends TestCase
|
|||||||
$latestJournal = $this->user()->transactionJournals()
|
$latestJournal = $this->user()->transactionJournals()
|
||||||
->orderBy('date', 'DESC')->first();
|
->orderBy('date', 'DESC')->first();
|
||||||
|
|
||||||
Log::debug(sprintf('Test testShowEmpty(%s)', $range));
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($latestJournal);
|
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($latestJournal);
|
||||||
|
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
|
||||||
$repository->shouldReceive('spentInPeriod')->andReturn('0');
|
$repository->shouldReceive('spentInPeriod')->andReturn('0');
|
||||||
$repository->shouldReceive('earnedInPeriod')->andReturn('0');
|
$repository->shouldReceive('earnedInPeriod')->andReturn('0');
|
||||||
|
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->once()->andReturn(new Collection);
|
$accountRepos->shouldReceive('getAccountsByType')->once()->andReturn(new Collection);
|
||||||
|
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
|
||||||
$collector->shouldReceive('setPage')->andReturnSelf()->once();
|
$collector->shouldReceive('setPage')->andReturnSelf()->once();
|
||||||
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->atLeast(1);
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->atLeast(1);
|
||||||
@@ -225,7 +240,6 @@ class ShowControllerTest extends TestCase
|
|||||||
$collector->shouldReceive('setCategory')->andReturnSelf()->atLeast(1);
|
$collector->shouldReceive('setCategory')->andReturnSelf()->atLeast(1);
|
||||||
$collector->shouldReceive('setTypes')->andReturnSelf()->atLeast(1);
|
$collector->shouldReceive('setTypes')->andReturnSelf()->atLeast(1);
|
||||||
$collector->shouldReceive('getTransactions')->andReturn(new Collection)->atLeast(1);
|
$collector->shouldReceive('getTransactions')->andReturn(new Collection)->atLeast(1);
|
||||||
|
|
||||||
$collector->shouldReceive('getPaginatedTransactions')->andReturn(new LengthAwarePaginator([], 0, 10))->atLeast(1);
|
$collector->shouldReceive('getPaginatedTransactions')->andReturn(new LengthAwarePaginator([], 0, 10))->atLeast(1);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +49,7 @@ class CategoryControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +62,10 @@ class CategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('categories.create'));
|
$response = $this->get(route('categories.create'));
|
||||||
@@ -79,7 +84,10 @@ class CategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('categories.delete', [1]));
|
$response = $this->get(route('categories.delete', [1]));
|
||||||
@@ -98,8 +106,9 @@ class CategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
$categoryRepos->shouldReceive('destroy')->andReturn(true);
|
$categoryRepos->shouldReceive('destroy')->andReturn(true);
|
||||||
|
|
||||||
$this->session(['categories.delete.uri' => 'http://localhost']);
|
$this->session(['categories.delete.uri' => 'http://localhost']);
|
||||||
@@ -119,7 +128,10 @@ class CategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('categories.edit', [1]));
|
$response = $this->get(route('categories.edit', [1]));
|
||||||
@@ -139,9 +151,12 @@ class CategoryControllerTest extends TestCase
|
|||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$category]))->once();
|
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$category]))->once();
|
||||||
$categoryRepos->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
|
$categoryRepos->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('categories.index'));
|
$response = $this->get(route('categories.index'));
|
||||||
@@ -160,6 +175,8 @@ class CategoryControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
$repository->shouldReceive('findNull')->andReturn(new Category);
|
$repository->shouldReceive('findNull')->andReturn(new Category);
|
||||||
$repository->shouldReceive('store')->andReturn(new Category);
|
$repository->shouldReceive('store')->andReturn(new Category);
|
||||||
@@ -186,6 +203,8 @@ class CategoryControllerTest extends TestCase
|
|||||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(TransactionJournal::first());
|
||||||
$repository->shouldReceive('update');
|
$repository->shouldReceive('update');
|
||||||
$repository->shouldReceive('findNull')->andReturn($category);
|
$repository->shouldReceive('findNull')->andReturn($category);
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use Steam;
|
use Steam;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
@@ -52,7 +53,7 @@ class AccountControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,6 +68,7 @@ class AccountControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// grab two expense accounts from the current user.
|
// grab two expense accounts from the current user.
|
||||||
$accounts = $this->user()->accounts()->where('account_type_id', 4)->take(2)->get();
|
$accounts = $this->user()->accounts()->where('account_type_id', 4)->take(2)->get();
|
||||||
|
|
||||||
@@ -103,9 +105,12 @@ class AccountControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testExpenseBudget(string $range): void
|
public function testExpenseBudget(string $range): void
|
||||||
{
|
{
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$transaction = factory(Transaction::class)->make();
|
$transaction = factory(Transaction::class)->make();
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
@@ -134,6 +139,7 @@ class AccountControllerTest extends TestCase
|
|||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$transaction = factory(Transaction::class)->make();
|
$transaction = factory(Transaction::class)->make();
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
@@ -164,6 +170,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
@@ -193,6 +202,8 @@ class AccountControllerTest extends TestCase
|
|||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
@@ -249,6 +260,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
@@ -278,6 +292,7 @@ class AccountControllerTest extends TestCase
|
|||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||||
@@ -304,6 +319,7 @@ class AccountControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(new Carbon);
|
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(new Carbon);
|
||||||
Steam::shouldReceive('balanceInRange')->andReturn(['2012-01-01' => '0']);
|
Steam::shouldReceive('balanceInRange')->andReturn(['2012-01-01' => '0']);
|
||||||
@@ -321,8 +337,14 @@ class AccountControllerTest extends TestCase
|
|||||||
public function testReport(): void
|
public function testReport(): void
|
||||||
{
|
{
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1), null);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(),'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
|
||||||
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1), null);
|
||||||
|
|
||||||
$generator->shouldReceive('multiSet')->andReturn([]);
|
$generator->shouldReceive('multiSet')->andReturn([]);
|
||||||
Steam::shouldReceive('balanceInRange')->andReturn(['2012-01-01' => '0']);
|
Steam::shouldReceive('balanceInRange')->andReturn(['2012-01-01' => '0']);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class BillControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class BudgetControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,7 +95,6 @@ class BudgetControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController
|
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController
|
||||||
* @expectedExceptionMessage This budget limit is not part of this budget.
|
|
||||||
*/
|
*/
|
||||||
public function testBudgetLimitWrongLimit(): void
|
public function testBudgetLimitWrongLimit(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class BudgetReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class CategoryControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class CategoryReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class ExpenseReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ declare(strict_types=1);
|
|||||||
namespace Tests\Feature\Controllers\Chart;
|
namespace Tests\Feature\Controllers\Chart;
|
||||||
|
|
||||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||||
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
use Steam;
|
use Steam;
|
||||||
@@ -41,7 +43,7 @@ class ReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,6 +53,10 @@ class ReportControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$currencyRepos->shouldReceive('setUser');
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$accountRepos->shouldReceive('setUser');
|
$accountRepos->shouldReceive('setUser');
|
||||||
@@ -78,6 +84,8 @@ class ReportControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$income = [1 => ['sum' => '100']];
|
$income = [1 => ['sum' => '100']];
|
||||||
$expense = [2 => ['sum' => '-100']];
|
$expense = [2 => ['sum' => '-100']];
|
||||||
$tasker->shouldReceive('getIncomeReport')->once()->andReturn($income);
|
$tasker->shouldReceive('getIncomeReport')->once()->andReturn($income);
|
||||||
@@ -96,6 +104,8 @@ class ReportControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$generator = $this->mock(GeneratorInterface::class);
|
$generator = $this->mock(GeneratorInterface::class);
|
||||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$income = [];
|
$income = [];
|
||||||
$expense = [];
|
$expense = [];
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class TagReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class CurrencyControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ namespace Tests\Feature\Controllers;
|
|||||||
|
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +44,7 @@ class DebugControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,11 +54,14 @@ class DebugControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('error'));
|
$response = $this->get(route('error'));
|
||||||
$response->assertStatus(500);
|
$response->assertStatus(500);
|
||||||
|
$response->assertSee('A very simple test error');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,7 +71,10 @@ class DebugControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('flush'));
|
$response = $this->get(route('flush'));
|
||||||
@@ -78,6 +86,9 @@ class DebugControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('debug'));
|
$response = $this->get(route('debug'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -88,6 +99,9 @@ class DebugControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testRoutes(): void
|
public function testRoutes(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('routes'));
|
$response = $this->get(route('routes'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -100,6 +114,9 @@ class DebugControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|||||||
@@ -30,8 +30,10 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface;
|
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +51,7 @@ class ExportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,6 +62,9 @@ class ExportControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('changeStatus')->once();
|
$repository->shouldReceive('changeStatus')->once();
|
||||||
|
|
||||||
@@ -74,16 +79,16 @@ class ExportControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\ExportController
|
* @covers \FireflyIII\Http\Controllers\ExportController
|
||||||
* @expectedExceptionMessage Against all expectations
|
|
||||||
*/
|
*/
|
||||||
public function testDownloadFailed(): void
|
public function testDownloadFailed(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('exists')->once()->andReturn(false);
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('export.download', ['testExport']));
|
$response = $this->get(route('export.download', ['testExport']));
|
||||||
@@ -97,6 +102,10 @@ class ExportControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -114,6 +123,11 @@ class ExportControllerTest extends TestCase
|
|||||||
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
|
|
||||||
$job = ExportJob::first();
|
$job = ExportJob::first();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('create')->andReturn($job);
|
$repository->shouldReceive('create')->andReturn($job);
|
||||||
@@ -139,7 +153,10 @@ class ExportControllerTest extends TestCase
|
|||||||
$processor = $this->mock(ProcessorInterface::class);
|
$processor = $this->mock(ProcessorInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->session(
|
$this->session(
|
||||||
['first' => new Carbon('2014-01-01')]
|
['first' => new Carbon('2014-01-01')]
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class HelpControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
@@ -51,7 +52,7 @@ class HomeControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -62,6 +63,8 @@ class HomeControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -83,6 +86,8 @@ class HomeControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -115,6 +120,10 @@ class HomeControllerTest extends TestCase
|
|||||||
$billRepos = $this->mock(BillRepositoryInterface::class);
|
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('count')->andReturn(1);
|
$accountRepos->shouldReceive('count')->andReturn(1);
|
||||||
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
|
||||||
@@ -148,6 +157,8 @@ class HomeControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('count')->andReturn(0);
|
$accountRepos->shouldReceive('count')->andReturn(0);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class CallbackControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class IndexControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -323,6 +323,7 @@ class IndexControllerTest extends TestCase
|
|||||||
$spectrePrerequisites = $this->mock(SpectrePrerequisites::class);
|
$spectrePrerequisites = $this->mock(SpectrePrerequisites::class);
|
||||||
$filePrerequisites = $this->mock(FilePrerequisites::class);
|
$filePrerequisites = $this->mock(FilePrerequisites::class);
|
||||||
$ynabPrerequisites = $this->mock(YnabPrerequisites::class);
|
$ynabPrerequisites = $this->mock(YnabPrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
// call methods:
|
// call methods:
|
||||||
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false);
|
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->andReturn(false);
|
||||||
@@ -357,6 +358,7 @@ class IndexControllerTest extends TestCase
|
|||||||
$filePrerequisites = $this->mock(FilePrerequisites::class);
|
$filePrerequisites = $this->mock(FilePrerequisites::class);
|
||||||
$userRepository = $this->mock(UserRepositoryInterface::class);
|
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||||
$ynabPrerequisites = $this->mock(YnabPrerequisites::class);
|
$ynabPrerequisites = $this->mock(YnabPrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
// call methods:
|
// call methods:
|
||||||
$fakePrerequisites->shouldReceive('setUser')->once();
|
$fakePrerequisites->shouldReceive('setUser')->once();
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace Tests\Feature\Controllers\Import;
|
|||||||
use FireflyIII\Import\JobConfiguration\FakeJobConfiguration;
|
use FireflyIII\Import\JobConfiguration\FakeJobConfiguration;
|
||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Log;
|
use Log;
|
||||||
@@ -43,7 +44,7 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,6 +63,9 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$configurator->shouldReceive('setImportJob')->once();
|
$configurator->shouldReceive('setImportJob')->once();
|
||||||
@@ -94,8 +98,10 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// mock calls:
|
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('import.job.configuration.index', [$job->key]));
|
$response = $this->get(route('import.job.configuration.index', [$job->key]));
|
||||||
@@ -120,6 +126,7 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$configurator->shouldReceive('setImportJob')->once();
|
$configurator->shouldReceive('setImportJob')->once();
|
||||||
@@ -152,6 +159,7 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$configurator->shouldReceive('setImportJob')->once();
|
$configurator->shouldReceive('setImportJob')->once();
|
||||||
@@ -186,6 +194,7 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// call thing.
|
// call thing.
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -212,6 +221,8 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$configurator->shouldReceive('setImportJob')->once();
|
$configurator->shouldReceive('setImportJob')->once();
|
||||||
@@ -245,6 +256,7 @@ class JobConfigurationControllerTest extends TestCase
|
|||||||
// mock repositories and configuration handling classes:
|
// mock repositories and configuration handling classes:
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$configurator = $this->mock(FakeJobConfiguration::class);
|
$configurator = $this->mock(FakeJobConfiguration::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$configurator->shouldReceive('setImportJob')->once();
|
$configurator->shouldReceive('setImportJob')->once();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ use FireflyIII\Import\Storage\ImportArrayStorage;
|
|||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use FireflyIII\Models\Tag;
|
use FireflyIII\Models\Tag;
|
||||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
@@ -48,7 +49,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +57,8 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Afake_job_' . random_int(1, 10000);
|
$job->key = 'Afake_job_' . random_int(1, 10000);
|
||||||
@@ -64,6 +67,8 @@ class JobStatusControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
// call thing.
|
// call thing.
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('import.job.status.index', [$job->key]));
|
$response = $this->get(route('import.job.status.index', [$job->key]));
|
||||||
@@ -76,6 +81,9 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testJson(): void
|
public function testJson(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Bfake_job_' . random_int(1, 10000);
|
$job->key = 'Bfake_job_' . random_int(1, 10000);
|
||||||
@@ -99,6 +107,8 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testJsonWithTag(): void
|
public function testJsonWithTag(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$tag = $this->user()->tags()->first();
|
$tag = $this->user()->tags()->first();
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
@@ -124,6 +134,9 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testJsonWithTagManyJournals(): void
|
public function testJsonWithTagManyJournals(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
/** @var Tag $tag */
|
/** @var Tag $tag */
|
||||||
$tag = $this->user()->tags()->first();
|
$tag = $this->user()->tags()->first();
|
||||||
$journal = $this->user()->transactionJournals()->first();
|
$journal = $this->user()->transactionJournals()->first();
|
||||||
@@ -154,6 +167,9 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testJsonWithTagOneJournal(): void
|
public function testJsonWithTagOneJournal(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
/** @var Tag $tag */
|
/** @var Tag $tag */
|
||||||
$tag = $this->user()->tags()->first();
|
$tag = $this->user()->tags()->first();
|
||||||
$journal = $this->user()->transactionJournals()->first();
|
$journal = $this->user()->transactionJournals()->first();
|
||||||
@@ -183,6 +199,8 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStart(): void
|
public function testStart(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Ffake_job_' . random_int(1, 10000);
|
$job->key = 'Ffake_job_' . random_int(1, 10000);
|
||||||
@@ -212,6 +230,8 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStartException(): void
|
public function testStartException(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Gfake_job_' . random_int(1, 10000);
|
$job->key = 'Gfake_job_' . random_int(1, 10000);
|
||||||
@@ -242,6 +262,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStartFireflyException(): void
|
public function testStartFireflyException(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Hfake_job_' . random_int(1, 10000);
|
$job->key = 'Hfake_job_' . random_int(1, 10000);
|
||||||
@@ -272,6 +293,12 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStartInvalidState(): void
|
public function testStartInvalidState(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
// mock calls:
|
||||||
|
$importRepos->shouldReceive('setStatus')->withArgs([Mockery::any(), 'error'])
|
||||||
|
->atLeast()->once();
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Ifake_job_' . random_int(1, 10000);
|
$job->key = 'Ifake_job_' . random_int(1, 10000);
|
||||||
@@ -285,7 +312,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->post(route('import.job.start', [$job->key]));
|
$response = $this->post(route('import.job.start', [$job->key]));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
$response->assertExactJson(['status' => 'NOK', 'message' => 'JobStatusController::start expects status "ready_to_run" instead of "error".']);
|
$response->assertExactJson(['status' => 'NOK', 'message' => 'JobStatusController::start expects status "ready_to_run" instead of "bad_state".']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -305,6 +332,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$storage = $this->mock(ImportArrayStorage::class);
|
$storage = $this->mock(ImportArrayStorage::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'storing_data']);
|
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'storing_data']);
|
||||||
@@ -336,6 +364,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$storage = $this->mock(ImportArrayStorage::class);
|
$storage = $this->mock(ImportArrayStorage::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock calls:
|
// mock calls:
|
||||||
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'storing_data']);
|
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'storing_data']);
|
||||||
@@ -355,6 +384,7 @@ class JobStatusControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testStoreInvalidState(): void
|
public function testStoreInvalidState(): void
|
||||||
{
|
{
|
||||||
|
$importRepos = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'Kfake_job_' . random_int(1, 10000);
|
$job->key = 'Kfake_job_' . random_int(1, 10000);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace Tests\Feature\Controllers\Import;
|
|||||||
use FireflyIII\Import\Prerequisites\FakePrerequisites;
|
use FireflyIII\Import\Prerequisites\FakePrerequisites;
|
||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Log;
|
use Log;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
@@ -45,7 +46,7 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,6 +54,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'A_pre_job_' . random_int(1, 10000);
|
$job->key = 'A_pre_job_' . random_int(1, 10000);
|
||||||
@@ -62,9 +67,9 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
// mock stuff
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
|
||||||
|
|
||||||
$prereq->shouldReceive('setUser')->times(2);
|
$prereq->shouldReceive('setUser')->times(2);
|
||||||
$prereq->shouldReceive('isComplete')->times(2)->andReturn(false);
|
$prereq->shouldReceive('isComplete')->times(2)->andReturn(false);
|
||||||
@@ -83,6 +88,9 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndexBadState(): void
|
public function testIndexBadState(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'B_pre_job_' . random_int(1, 10000);
|
$job->key = 'B_pre_job_' . random_int(1, 10000);
|
||||||
@@ -92,6 +100,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('import.prerequisites.index', ['fake', $job->key]));
|
$response = $this->get(route('import.prerequisites.index', ['fake', $job->key]));
|
||||||
$response->assertStatus(302);
|
$response->assertStatus(302);
|
||||||
@@ -103,6 +115,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testIndexComplete(): void
|
public function testIndexComplete(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'C_pre_job_' . random_int(1, 10000);
|
$job->key = 'C_pre_job_' . random_int(1, 10000);
|
||||||
@@ -112,10 +128,7 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
// mock stuff
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
|
||||||
|
|
||||||
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'has_prereq']);
|
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'has_prereq']);
|
||||||
$prereq->shouldReceive('setUser')->times(2);
|
$prereq->shouldReceive('setUser')->times(2);
|
||||||
$prereq->shouldReceive('isComplete')->times(2)->andReturn(true);
|
$prereq->shouldReceive('isComplete')->times(2)->andReturn(true);
|
||||||
@@ -134,6 +147,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPost(): void
|
public function testPost(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
||||||
@@ -143,10 +160,7 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
// mock stuff
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
|
||||||
|
|
||||||
$prereq->shouldReceive('setUser')->times(2);
|
$prereq->shouldReceive('setUser')->times(2);
|
||||||
$prereq->shouldReceive('storePrerequisites')->once()->andReturn(new MessageBag);
|
$prereq->shouldReceive('storePrerequisites')->once()->andReturn(new MessageBag);
|
||||||
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'has_prereq']);
|
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'has_prereq']);
|
||||||
@@ -165,6 +179,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostBadState(): void
|
public function testPostBadState(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
||||||
@@ -174,10 +192,7 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
$job->file_type = '';
|
$job->file_type = '';
|
||||||
$job->save();
|
$job->save();
|
||||||
|
|
||||||
// mock stuff
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
|
||||||
|
|
||||||
$prereq->shouldReceive('setUser')->times(1);
|
$prereq->shouldReceive('setUser')->times(1);
|
||||||
$prereq->shouldReceive('isComplete')->times(1)->andReturn(false);
|
$prereq->shouldReceive('isComplete')->times(1)->andReturn(false);
|
||||||
|
|
||||||
@@ -195,10 +210,12 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostNoJob(): void
|
public function testPostNoJob(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$prereq->shouldReceive('setUser')->once();
|
$prereq->shouldReceive('setUser')->once();
|
||||||
$prereq->shouldReceive('storePrerequisites')->once()->andReturn(new MessageBag);
|
$prereq->shouldReceive('storePrerequisites')->once()->andReturn(new MessageBag);
|
||||||
|
|
||||||
@@ -218,6 +235,10 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostWithMessages(): void
|
public function testPostWithMessages(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$prereq = $this->mock(FakePrerequisites::class);
|
||||||
|
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||||
|
|
||||||
$job = new ImportJob;
|
$job = new ImportJob;
|
||||||
$job->user_id = $this->user()->id;
|
$job->user_id = $this->user()->id;
|
||||||
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
$job->key = 'D_pre_job_' . random_int(1, 10000);
|
||||||
@@ -229,10 +250,7 @@ class PrerequisitesControllerTest extends TestCase
|
|||||||
|
|
||||||
$messages = new MessageBag;
|
$messages = new MessageBag;
|
||||||
$messages->add('some', 'message');
|
$messages->add('some', 'message');
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
// mock stuff
|
|
||||||
$prereq = $this->mock(FakePrerequisites::class);
|
|
||||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
|
||||||
|
|
||||||
$prereq->shouldReceive('setUser')->times(1);
|
$prereq->shouldReceive('setUser')->times(1);
|
||||||
$prereq->shouldReceive('isComplete')->times(1)->andReturn(false);
|
$prereq->shouldReceive('isComplete')->times(1)->andReturn(false);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class JavascriptControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class AutoCompleteControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class BoxControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,6 +61,8 @@ class BoxControllerTest extends TestCase
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('getAvailableBudget')->andReturn('1000');
|
$repository->shouldReceive('getAvailableBudget')->andReturn('1000');
|
||||||
$repository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
|
$repository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
|
||||||
$repository->shouldReceive('collectBudgetInformation')->andReturn($return);
|
$repository->shouldReceive('collectBudgetInformation')->andReturn($return);
|
||||||
@@ -82,6 +84,8 @@ class BoxControllerTest extends TestCase
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('getAvailableBudget')->andReturn('1000');
|
$repository->shouldReceive('getAvailableBudget')->andReturn('1000');
|
||||||
$repository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
|
$repository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
|
||||||
$repository->shouldReceive('collectBudgetInformation')->andReturn($return);
|
$repository->shouldReceive('collectBudgetInformation')->andReturn($return);
|
||||||
@@ -99,6 +103,8 @@ class BoxControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
// try a collector for income:
|
// try a collector for income:
|
||||||
|
|
||||||
@@ -124,6 +130,10 @@ class BoxControllerTest extends TestCase
|
|||||||
|
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$collector = $this->mock(TransactionCollectorInterface::class);
|
$collector = $this->mock(TransactionCollectorInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
|
|
||||||
// try a collector for income:
|
// try a collector for income:
|
||||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||||
@@ -143,6 +153,8 @@ class BoxControllerTest extends TestCase
|
|||||||
public function testBills(): void
|
public function testBills(): void
|
||||||
{
|
{
|
||||||
$billRepos = $this->mock(BillRepositoryInterface::class);
|
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
$billRepos->shouldReceive('getBillsPaidInRange')->andReturn('0');
|
$billRepos->shouldReceive('getBillsPaidInRange')->andReturn('0');
|
||||||
$billRepos->shouldReceive('getBillsUnpaidInRange')->andReturn('0');
|
$billRepos->shouldReceive('getBillsUnpaidInRange')->andReturn('0');
|
||||||
|
|
||||||
@@ -165,6 +177,7 @@ class BoxControllerTest extends TestCase
|
|||||||
|
|
||||||
|
|
||||||
$netWorthHelper = $this->mock(NetWorthInterface::class);
|
$netWorthHelper = $this->mock(NetWorthInterface::class);
|
||||||
|
|
||||||
$netWorthHelper->shouldReceive('setUser')->once();
|
$netWorthHelper->shouldReceive('setUser')->once();
|
||||||
$netWorthHelper->shouldReceive('getNetWorthByCurrency')->once()->andReturn($result);
|
$netWorthHelper->shouldReceive('getNetWorthByCurrency')->once()->andReturn($result);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class ExchangeControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class FrontpageControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class IntroControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,9 +27,12 @@ namespace Tests\Feature\Controllers\Json;
|
|||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +47,7 @@ class ReconcileControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,6 +57,9 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testOverview(): void
|
public function testOverview(): void
|
||||||
{
|
{
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
$transactions = $this->user()->transactions()->inRandomOrder()->take(3)->get();
|
$transactions = $this->user()->transactions()->inRandomOrder()->take(3)->get();
|
||||||
$repository = $this->mock(JournalRepositoryInterface::class);
|
$repository = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
$repository->shouldReceive('firstNull')->andReturn(new TransactionJournal);
|
||||||
@@ -74,10 +80,13 @@ class ReconcileControllerTest extends TestCase
|
|||||||
* Test overview when it's not an asset.
|
* Test overview when it's not an asset.
|
||||||
*
|
*
|
||||||
* @covers \FireflyIII\Http\Controllers\Json\ReconcileController
|
* @covers \FireflyIII\Http\Controllers\Json\ReconcileController
|
||||||
* @expectedExceptionMessage is not an asset account
|
|
||||||
*/
|
*/
|
||||||
public function testOverviewNotAsset(): void
|
public function testOverviewNotAsset(): void
|
||||||
{
|
{
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
|
||||||
$account = $this->user()->accounts()->where('account_type_id', '!=', 3)->first();
|
$account = $this->user()->accounts()->where('account_type_id', '!=', 3)->first();
|
||||||
$parameters = [
|
$parameters = [
|
||||||
'startBalance' => '0',
|
'startBalance' => '0',
|
||||||
@@ -99,6 +108,11 @@ class ReconcileControllerTest extends TestCase
|
|||||||
public function testTransactions(): void
|
public function testTransactions(): void
|
||||||
{
|
{
|
||||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
|
||||||
$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));
|
$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -111,6 +125,11 @@ class ReconcileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testTransactionsInitialBalance(): void
|
public function testTransactionsInitialBalance(): void
|
||||||
{
|
{
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||||
->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);
|
->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,6 +158,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEventsStartAfterEnd(): void
|
public function testEventsStartAfterEnd(): void
|
||||||
{
|
{
|
||||||
|
$repository = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
|
||||||
$parameters = [
|
$parameters = [
|
||||||
'start' => '2018-01-01',
|
'start' => '2018-01-01',
|
||||||
'end' => '2018-01-31',
|
'end' => '2018-01-31',
|
||||||
@@ -336,6 +338,8 @@ class RecurrenceControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSuggest(): void
|
public function testSuggest(): void
|
||||||
{
|
{
|
||||||
|
$repository = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|
||||||
$parameters = [
|
$parameters = [
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class JsonControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +47,7 @@ class NewUserControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -57,8 +59,11 @@ class NewUserControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('count')->andReturn(0);
|
$accountRepos->shouldReceive('count')->andReturn(0);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
|
|
||||||
$this->be($this->emptyUser());
|
$this->be($this->emptyUser());
|
||||||
$response = $this->get(route('new-user.index'));
|
$response = $this->get(route('new-user.index'));
|
||||||
@@ -74,6 +79,8 @@ class NewUserControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('count')->andReturn(1);
|
$accountRepos->shouldReceive('count')->andReturn(1);
|
||||||
|
|
||||||
@@ -92,6 +99,8 @@ class NewUserControllerTest extends TestCase
|
|||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('store')->times(3);
|
$accountRepos->shouldReceive('store')->times(3);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
@@ -118,6 +127,8 @@ class NewUserControllerTest extends TestCase
|
|||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('store')->times(3);
|
$accountRepos->shouldReceive('store')->times(3);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(null);
|
$currencyRepos->shouldReceive('findNull')->andReturn(null);
|
||||||
@@ -145,6 +156,8 @@ class NewUserControllerTest extends TestCase
|
|||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('store')->times(3);
|
$accountRepos->shouldReceive('store')->times(3);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
namespace Tests\Feature\Controllers;
|
namespace Tests\Feature\Controllers;
|
||||||
|
|
||||||
use Amount;
|
use Amount;
|
||||||
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\PiggyBank;
|
use FireflyIII\Models\PiggyBank;
|
||||||
@@ -32,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
@@ -53,7 +55,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -63,8 +65,15 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testAdd(): void
|
public function testAdd(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$piggyRepos->shouldReceive('getCurrentAmount')->andReturn('0');
|
$piggyRepos->shouldReceive('getCurrentAmount')->andReturn('0');
|
||||||
$piggyRepos->shouldReceive('leftOnAccount')->andReturn('0');
|
$piggyRepos->shouldReceive('leftOnAccount')->andReturn('0');
|
||||||
@@ -80,8 +89,17 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testAddMobile(): void
|
public function testAddMobile(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$piggyRepos->shouldReceive('getCurrentAmount')->andReturn('0');
|
$piggyRepos->shouldReceive('getCurrentAmount')->andReturn('0');
|
||||||
$piggyRepos->shouldReceive('leftOnAccount')->andReturn('0');
|
$piggyRepos->shouldReceive('leftOnAccount')->andReturn('0');
|
||||||
@@ -98,21 +116,20 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testCreate(): void
|
public function testCreate(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
|
||||||
|
|
||||||
// new account list thing.
|
// new account list thing.
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$account = factory(Account::class)->make();
|
$account = factory(Account::class)->make();
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn($currency);
|
$currencyRepos->shouldReceive('findNull')->andReturn($currency);
|
||||||
|
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
|
||||||
|
|
||||||
Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
|
Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
|
||||||
Amount::shouldReceive('balance')->andReturn('0');
|
Amount::shouldReceive('balance')->andReturn('0');
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
|
|
||||||
@@ -128,7 +145,12 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testDelete(): void
|
public function testDelete(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -143,8 +165,12 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testDestroy(): void
|
public function testDestroy(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$repository->shouldReceive('destroy')->andReturn(true);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
@@ -162,18 +188,23 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testEdit(): void
|
public function testEdit(): void
|
||||||
{
|
{
|
||||||
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$account = factory(Account::class)->make();
|
$account = factory(Account::class)->make();
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
// mock stuff for new account list thing.
|
// mock stuff for new account list thing.
|
||||||
$currency = TransactionCurrency::first();
|
$currency = TransactionCurrency::first();
|
||||||
$account = factory(Account::class)->make();
|
$account = factory(Account::class)->make();
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn($currency);
|
$currencyRepos->shouldReceive('findNull')->andReturn($currency);
|
||||||
|
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
|
||||||
$accountRepos->shouldReceive('getAccountsByType')
|
$accountRepos->shouldReceive('getAccountsByType')
|
||||||
->withArgs([[AccountType::ASSET, AccountType::DEFAULT]])->andReturn(new Collection([$account]))->once();
|
->withArgs([[AccountType::ASSET, AccountType::DEFAULT]])->andReturn(new Collection([$account]))->once();
|
||||||
|
|
||||||
@@ -194,10 +225,28 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$first = $this->user()->transactionJournals()->inRandomOrder()->first();
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$piggies = $this->user()->piggyBanks()->take(2)->get();
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$accountRepos->shouldReceive('setUser');
|
||||||
|
$currencyRepos->shouldReceive('setUser');
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'accountRole'])->andReturn('defaultAsset')->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'accountNumber'])->andReturn('1234')->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'BIC'])->andReturn('1234')->atLeast()->once();
|
||||||
|
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getOpeningBalanceAmount')->withAnyArgs()->andReturn('10')->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getOpeningBalanceDate')->withAnyArgs()->andReturn(new Carbon())->atLeast()->once();
|
||||||
|
$accountRepos->shouldReceive('getNoteText')->withAnyArgs()->andReturn('Hello')->atLeast()->once();
|
||||||
|
|
||||||
|
|
||||||
|
$first = $this->user()->transactionJournals()->inRandomOrder()->first();
|
||||||
|
$piggies = $this->user()->piggyBanks()->take(2)->get();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn($first);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn($first);
|
||||||
$repository->shouldReceive('getPiggyBanks')->andReturn($piggies);
|
$repository->shouldReceive('getPiggyBanks')->andReturn($piggies);
|
||||||
$repository->shouldReceive('getCurrentAmount')->andReturn('10');
|
$repository->shouldReceive('getCurrentAmount')->andReturn('10');
|
||||||
@@ -220,8 +269,15 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testPostAdd(): void
|
public function testPostAdd(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('canAddAmount')->once()->andReturn(true);
|
$repository->shouldReceive('canAddAmount')->once()->andReturn(true);
|
||||||
$repository->shouldReceive('addAmount')->once()->andReturn(true);
|
$repository->shouldReceive('addAmount')->once()->andReturn(true);
|
||||||
@@ -242,8 +298,15 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testPostAddTooMuch(): void
|
public function testPostAddTooMuch(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('canAddAmount')->once()->andReturn(false);
|
$repository->shouldReceive('canAddAmount')->once()->andReturn(false);
|
||||||
|
|
||||||
@@ -261,8 +324,15 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testPostRemove(): void
|
public function testPostRemove(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('canRemoveAmount')->once()->andReturn(true);
|
$repository->shouldReceive('canRemoveAmount')->once()->andReturn(true);
|
||||||
$repository->shouldReceive('removeAmount')->once()->andReturn(true);
|
$repository->shouldReceive('removeAmount')->once()->andReturn(true);
|
||||||
@@ -281,8 +351,15 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testPostRemoveTooMuch(): void
|
public function testPostRemoveTooMuch(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('canRemoveAmount')->once()->andReturn(false);
|
$repository->shouldReceive('canRemoveAmount')->once()->andReturn(false);
|
||||||
|
|
||||||
@@ -300,7 +377,14 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testRemove(): void
|
public function testRemove(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -314,7 +398,14 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testRemoveMobile(): void
|
public function testRemoveMobile(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -331,7 +422,11 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testSetOrder(): void
|
public function testSetOrder(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('setOrder')->once()->withArgs([Mockery::any(), 3])->andReturn(false);
|
$repository->shouldReceive('setOrder')->once()->withArgs([Mockery::any(), 3])->andReturn(false);
|
||||||
|
|
||||||
$data = ['order' => '3'];
|
$data = ['order' => '3'];
|
||||||
@@ -347,9 +442,18 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testShow(): void
|
public function testShow(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$first = $this->user()->transactionJournals()->inRandomOrder()->first();
|
$first = $this->user()->transactionJournals()->inRandomOrder()->first();
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$accountRepos->shouldReceive('setUser');
|
||||||
|
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||||
|
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->atLeast()->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$currencyRepos->shouldReceive('setUser');
|
||||||
$repository->shouldReceive('setUser')->once();
|
$repository->shouldReceive('setUser')->once();
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn($first);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn($first);
|
||||||
$repository->shouldReceive('getEvents')->andReturn(new Collection);
|
$repository->shouldReceive('getEvents')->andReturn(new Collection);
|
||||||
@@ -370,8 +474,12 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testStore(): void
|
public function testStore(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('store')->andReturn(new PiggyBank);
|
$repository->shouldReceive('store')->andReturn(new PiggyBank);
|
||||||
|
|
||||||
@@ -396,8 +504,12 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testUpdate(): void
|
public function testUpdate(): void
|
||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('update')->andReturn(new PiggyBank);
|
$repository->shouldReceive('update')->andReturn(new PiggyBank);
|
||||||
|
|
||||||
|
|||||||
@@ -49,12 +49,11 @@ class ReportControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Popup\ReportController
|
* @covers \FireflyIII\Http\Controllers\Popup\ReportController
|
||||||
* @expectedExceptionMessage Could not parse end date
|
|
||||||
*/
|
*/
|
||||||
public function testBadEndDate(): void
|
public function testBadEndDate(): void
|
||||||
{
|
{
|
||||||
@@ -168,7 +167,6 @@ class ReportControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\Popup\ReportController
|
* @covers \FireflyIII\Http\Controllers\Popup\ReportController
|
||||||
* @expectedExceptionMessage Firefly cannot handle this type of info-button
|
|
||||||
*/
|
*/
|
||||||
public function testBalanceAmountTagRole(): void
|
public function testBalanceAmountTagRole(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +47,7 @@ class PreferencesControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -59,6 +60,10 @@ class PreferencesControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection)->once();
|
$accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection)->once();
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ProfileControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,6 +57,10 @@ class ProfileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testChangeEmail(): void
|
public function testChangeEmail(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('profile.change-email'));
|
$response = $this->get(route('profile.change-email'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -70,7 +74,10 @@ class ProfileControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('profile.change-password'));
|
$response = $this->get(route('profile.change-password'));
|
||||||
@@ -85,6 +92,10 @@ class ProfileControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
Google2FA::shouldReceive('generateSecretKey')->andReturn('secret');
|
Google2FA::shouldReceive('generateSecretKey')->andReturn('secret');
|
||||||
Google2FA::shouldReceive('getQRCodeInline')->andReturn('long-data-url');
|
Google2FA::shouldReceive('getQRCodeInline')->andReturn('long-data-url');
|
||||||
@@ -97,10 +108,13 @@ class ProfileControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||||
* @expectedExceptionMessage Invalid token
|
|
||||||
*/
|
*/
|
||||||
public function testConfirmEmailChangeNoToken(): void
|
public function testConfirmEmailChangeNoToken(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Preferences::shouldReceive('findByName')->withArgs(['email_change_confirm_token'])->andReturn(new Collection());
|
Preferences::shouldReceive('findByName')->withArgs(['email_change_confirm_token'])->andReturn(new Collection());
|
||||||
// email_change_confirm_token
|
// email_change_confirm_token
|
||||||
$response = $this->get(route('profile.confirm-email-change', ['some-fake-token']));
|
$response = $this->get(route('profile.confirm-email-change', ['some-fake-token']));
|
||||||
@@ -113,6 +127,7 @@ class ProfileControllerTest extends TestCase
|
|||||||
public function testConfirmEmailWithToken(): void
|
public function testConfirmEmailWithToken(): void
|
||||||
{
|
{
|
||||||
$repository = $this->mock(UserRepositoryInterface::class);
|
$repository = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('unblockUser');
|
$repository->shouldReceive('unblockUser');
|
||||||
$preference = new Preference;
|
$preference = new Preference;
|
||||||
$preference->data = 'existing-token';
|
$preference->data = 'existing-token';
|
||||||
@@ -132,6 +147,11 @@ class ProfileControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -147,6 +167,10 @@ class ProfileControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -257,6 +281,11 @@ class ProfileControllerTest extends TestCase
|
|||||||
Preference::where('user_id', $this->user()->id)->where('name', 'access_token')->delete();
|
Preference::where('user_id', $this->user()->id)->where('name', 'access_token')->delete();
|
||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||||
|
|
||||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@@ -274,6 +303,7 @@ class ProfileControllerTest extends TestCase
|
|||||||
'email' => 'new@example.com',
|
'email' => 'new@example.com',
|
||||||
];
|
];
|
||||||
$repository = $this->mock(UserRepositoryInterface::class);
|
$repository = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$repository->shouldReceive('findByEmail')->once()->andReturn(null);
|
$repository->shouldReceive('findByEmail')->once()->andReturn(null);
|
||||||
$repository->shouldReceive('changeEmail')->once()->andReturn(true);
|
$repository->shouldReceive('changeEmail')->once()->andReturn(true);
|
||||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->once()->andReturn(false);
|
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->once()->andReturn(false);
|
||||||
@@ -396,6 +426,8 @@ class ProfileControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostCode(): void
|
public function testPostCode(): void
|
||||||
{
|
{
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$secret = '0123456789abcde';
|
$secret = '0123456789abcde';
|
||||||
$key = '123456';
|
$key = '123456';
|
||||||
|
|
||||||
@@ -541,7 +573,6 @@ class ProfileControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||||
* @expectedExceptionMessage Invalid token
|
|
||||||
*/
|
*/
|
||||||
public function testUndoEmailChangeBadToken(): void
|
public function testUndoEmailChangeBadToken(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,12 +26,16 @@ namespace Tests\Feature\Controllers\Recurring;
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +50,7 @@ class CreateControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +60,13 @@ class CreateControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$budgetRepos->shouldReceive('getActiveBudgets')->andReturn(new Collection)->once();
|
$budgetRepos->shouldReceive('getActiveBudgets')->andReturn(new Collection)->once();
|
||||||
\Amount::shouldReceive('getDefaultCurrency')->andReturn(TransactionCurrency::find(1));
|
\Amount::shouldReceive('getDefaultCurrency')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
@@ -76,6 +87,11 @@ class CreateControllerTest extends TestCase
|
|||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
$tomorrow = Carbon::create()->addDays(2);
|
$tomorrow = Carbon::create()->addDays(2);
|
||||||
$recurrence = $this->user()->recurrences()->first();
|
$recurrence = $this->user()->recurrences()->first();
|
||||||
$data = [
|
$data = [
|
||||||
@@ -125,6 +141,13 @@ class CreateControllerTest extends TestCase
|
|||||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$tomorrow = Carbon::create()->addDays(2);
|
$tomorrow = Carbon::create()->addDays(2);
|
||||||
$recurrence = $this->user()->recurrences()->first();
|
$recurrence = $this->user()->recurrences()->first();
|
||||||
$data = [
|
$data = [
|
||||||
@@ -176,6 +199,13 @@ class CreateControllerTest extends TestCase
|
|||||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$tomorrow = Carbon::create()->addDays(2);
|
$tomorrow = Carbon::create()->addDays(2);
|
||||||
$recurrence = $this->user()->recurrences()->first();
|
$recurrence = $this->user()->recurrences()->first();
|
||||||
$data = [
|
$data = [
|
||||||
@@ -228,6 +258,12 @@ class CreateControllerTest extends TestCase
|
|||||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||||
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
|
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
||||||
$tomorrow = Carbon::create()->addDays(2);
|
$tomorrow = Carbon::create()->addDays(2);
|
||||||
$recurrence = $this->user()->recurrences()->first();
|
$recurrence = $this->user()->recurrences()->first();
|
||||||
$data = [
|
$data = [
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ declare(strict_types=1);
|
|||||||
namespace Tests\Feature\Controllers\Recurring;
|
namespace Tests\Feature\Controllers\Recurring;
|
||||||
|
|
||||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mockery;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,7 +42,7 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Log::debug(sprintf('Now in %s.', \get_class($this)));
|
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,8 +51,10 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function testDelete(): void
|
public function testDelete(): void
|
||||||
{
|
{
|
||||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
$recurringRepos->shouldReceive('getTransactions')->andReturn(new Collection())->once();
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
|
$recurringRepos->shouldReceive('getTransactions')->andReturn(new Collection())->once();
|
||||||
|
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->get(route('recurring.delete', [1]));
|
$response = $this->get(route('recurring.delete', [1]));
|
||||||
@@ -64,6 +68,8 @@ class DeleteControllerTest extends TestCase
|
|||||||
public function testDestroy(): void
|
public function testDestroy(): void
|
||||||
{
|
{
|
||||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||||
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
|
|
||||||
$recurringRepos->shouldReceive('destroy')->once();
|
$recurringRepos->shouldReceive('destroy')->once();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user