diff --git a/.env.dusk.local b/.env.dusk.local new file mode 100644 index 000000000..abf54cf77 --- /dev/null +++ b/.env.dusk.local @@ -0,0 +1,105 @@ +# -------------------------------------------- +# REQUIRED: BASIC APP SETTINGS +# -------------------------------------------- +APP_ENV=local +APP_DEBUG=false +APP_KEY=base64:hTUIUh9CP6dQx+6EjSlfWTgbaMaaRvlpEwk45vp+xmk= +APP_URL=http://127.0.0.1:8000 +APP_TIMEZONE='US/Eastern' +APP_LOCALE=en +APP_LOCKED=false +MAX_RESULTS=200 + +# -------------------------------------------- +# REQUIRED: UPLOADED FILE STORAGE SETTINGS +# -------------------------------------------- +PRIVATE_FILESYSTEM_DISK=local +PUBLIC_FILESYSTEM_DISK=local_public + +# -------------------------------------------- +# REQUIRED: DATABASE SETTINGS +# -------------------------------------------- +DB_CONNECTION=mysql +DB_HOST=localhost +DB_DATABASE=snipeit-local +DB_USERNAME=snipeit-local +DB_PASSWORD=snipeit-local +DB_PREFIX=null +DB_DUMP_PATH='/Applications/MAMP/Library/bin' + +# -------------------------------------------- +# OPTIONAL: SSL DATABASE SETTINGS +# -------------------------------------------- +DB_SSL=false +DB_SSL_KEY_PATH=null +DB_SSL_CERT_PATH=null +DB_SSL_CA_PATH=null +DB_SSL_CIPHER=null + +# -------------------------------------------- +# REQUIRED: OUTGOING MAIL SERVER SETTINGS +# -------------------------------------------- +MAIL_DRIVER="log" + + +# -------------------------------------------- +# REQUIRED: IMAGE LIBRARY +# This should be gd or imagick +# -------------------------------------------- +IMAGE_LIB=gd + + +# -------------------------------------------- +# OPTIONAL: SESSION SETTINGS +# -------------------------------------------- +SESSION_LIFETIME=12000 +EXPIRE_ON_CLOSE=false +ENCRYPT=true +COOKIE_NAME=snipeit_v5_local +SECURE_COOKIES=true + +# -------------------------------------------- +# OPTIONAL: SECURITY HEADER SETTINGS +# -------------------------------------------- +REFERRER_POLICY=same-origin +ENABLE_CSP=true +CORS_ALLOWED_ORIGINS="*" + +# -------------------------------------------- +# OPTIONAL: CACHE SETTINGS +# -------------------------------------------- +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +# -------------------------------------------- +# OPTIONAL: LOGIN THROTTLING +# -------------------------------------------- +LOGIN_MAX_ATTEMPTS=50000 +LOGIN_LOCKOUT_DURATION=1000 +RESET_PASSWORD_LINK_EXPIRES=15 + +# -------------------------------------------- +# OPTIONAL: API +# -------------------------------------------- +API_MAX_REQUESTS_PER_HOUR=200 + +# -------------------------------------------- +# OPTIONAL: SAML SETTINGS +# -------------------------------------------- +DISABLE_NOSAML_LOCAL_LOGIN=true + + +# -------------------------------------------- +# OPTIONAL: MISC +# -------------------------------------------- +APP_LOG=single +LOG_LEVEL=debug +LOG_CHANNEL=stack +LOG_SLACK_WEBHOOK_URL=null +APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1 +ALLOW_IFRAMING=true +ENABLE_HSTS=false +WARN_DEBUG=false +APP_CIPHER=AES-256-CBC + diff --git a/.env.testing-ci b/.env.testing-ci index a39cb5976..af698f840 100644 --- a/.env.testing-ci +++ b/.env.testing-ci @@ -1,10 +1,10 @@ # -------------------------------------------- # REQUIRED: BASIC APP SETTINGS # -------------------------------------------- -APP_ENV=testing-ci +APP_ENV='testing-ci' APP_DEBUG=false -APP_KEY=ChangeMe -APP_URL=http://localhost:8000 +APP_KEY='base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=' +APP_URL='http://localhost:8000' APP_TIMEZONE='US/Pacific' APP_LOCALE=en FILESYSTEM_DISK=local @@ -12,9 +12,9 @@ FILESYSTEM_DISK=local # -------------------------------------------- # REQUIRED: DATABASE SETTINGS # -------------------------------------------- -DB_CONNECTION=mysql +DB_CONNECTION=sqlite DB_HOST=localhost -DB_DATABASE=snipeit_unit +DB_DATABASE='sqlite_testing' DB_USERNAME=root DB_PASSWORD=null @@ -22,13 +22,7 @@ DB_PASSWORD=null # REQUIRED: OUTGOING MAIL SERVER SETTINGS # -------------------------------------------- MAIL_DRIVER=log -MAIL_HOST=email-smtp.us-west-2.amazonaws.com -MAIL_PORT=587 -MAIL_USERNAME=YOURUSERNAME -MAIL_PASSWORD=YOURPASSWORD -MAIL_ENCRYPTION=null -MAIL_FROM_ADDR=you@example.com -MAIL_FROM_NAME=Snipe-IT + # -------------------------------------------- # REQUIRED: IMAGE LIBRARY @@ -37,37 +31,7 @@ MAIL_FROM_NAME=Snipe-IT IMAGE_LIB=gd -# -------------------------------------------- -# OPTIONAL: AWS S3 SETTINGS -# -------------------------------------------- -AWS_SECRET_ACCESS_KEY=null -AWS_ACCESS_KEY_ID=null -AWS_DEFAULT_REGION=null -AWS_BUCKET=null -AWS_BUCKET_ROOT=null -AWS_URL=null - - -# -------------------------------------------- -# OPTIONAL: CACHE SETTINGS -# -------------------------------------------- -CACHE_DRIVER=file -SESSION_DRIVER=file -QUEUE_DRIVER=sync - - -# -------------------------------------------- -# OPTIONAL: SESSION SETTINGS -# -------------------------------------------- -SESSION_LIFETIME=12000 -EXPIRE_ON_CLOSE=false -ENCRYPT=false -COOKIE_NAME=snipeittest_session -COOKIE_DOMAIN=null -SECURE_COOKIES=false - - # -------------------------------------------- # OPTIONAL: APP LOG FORMAT # -------------------------------------------- -APP_LOG=single +APP_LOG=single \ No newline at end of file diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index c8acd65f1..93d16ff5b 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -135,7 +135,7 @@ class CheckoutableListener /** * Notify Admin users if the settings is activated */ - if (Setting::getSettings()->admin_cc_email != '') { + if ((Setting::getSettings()) && (Setting::getSettings()->admin_cc_email != '')) { $notifiables->push(new AdminRecipient()); } diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 7be424077..3c5ffbb8c 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -114,6 +114,7 @@ class Asset extends Depreciable 'purchase_cost' => 'numeric|nullable', 'next_audit_date' => 'date|nullable', 'last_audit_date' => 'date|nullable', + 'supplier_id' => 'exists:suppliers,id|nullable', ]; /** diff --git a/app/Models/AssetModel.php b/app/Models/AssetModel.php index 7968f8408..d4d6776a4 100755 --- a/app/Models/AssetModel.php +++ b/app/Models/AssetModel.php @@ -30,7 +30,7 @@ class AssetModel extends SnipeModel 'name' => 'required|min:1|max:255', 'model_number' => 'max:255|nullable', 'category_id' => 'required|integer|exists:categories,id', - 'manufacturer_id' => 'required|integer|exists:manufacturers,id', + 'manufacturer_id' => 'integer|exists:manufacturers,id|nullable', 'eol' => 'integer:min:0|max:240|nullable', ]; diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 44708220a..c56c1a371 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -53,7 +53,7 @@ class CheckoutAssetNotification extends Notification { $notifyBy = []; - if (Setting::getSettings()->slack_endpoint != '') { + if ((Setting::getSettings()) && (Setting::getSettings()->slack_endpoint != '')) { \Log::debug('use slack'); $notifyBy[] = 'slack'; } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index bb5643a92..86903e6dd 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -61,8 +61,15 @@ class AppServiceProvider extends ServiceProvider */ public function register() { + // Only load rollbar if there is a rollbar key and the app is in production if (($this->app->environment('production')) && (config('logging.channels.rollbar.access_token'))) { $this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class); - } + } + + // Only load dusk's service provider if the app is in local or develop mode + if ($this->app->environment(['local', 'develop'])) { + $this->app->register(\Laravel\Dusk\DuskServiceProvider::class); + } + } } diff --git a/c3.php b/c3.php deleted file mode 100644 index 285a9185a..000000000 --- a/c3.php +++ /dev/null @@ -1,275 +0,0 @@ - $value) { - $_SERVER["HTTP_X_CODECEPTION_".strtoupper($key)] = $value; - } - } -} - -if (!array_key_exists('HTTP_X_CODECEPTION_CODECOVERAGE', $_SERVER)) { - return; -} - -if (!function_exists('__c3_error')) { - function __c3_error($message) - { - $errorLogFile = defined('C3_CODECOVERAGE_ERROR_LOG_FILE') ? - C3_CODECOVERAGE_ERROR_LOG_FILE : - C3_CODECOVERAGE_MEDIATE_STORAGE . DIRECTORY_SEPARATOR . 'error.txt'; - if (is_writable($errorLogFile)) { - file_put_contents($errorLogFile, $message); - }else{ - $message = "Could not write error to log file ($errorLogFile), original message: $message"; - } - if (!headers_sent()) { - header('X-Codeception-CodeCoverage-Error: ' . str_replace("\n", ' ', $message), true, 500); - } - setcookie('CODECEPTION_CODECOVERAGE_ERROR', $message); - } -} - -// phpunit codecoverage shimming -if (class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) { - class_alias('SebastianBergmann\CodeCoverage\CodeCoverage', 'PHP_CodeCoverage'); - class_alias('SebastianBergmann\CodeCoverage\Report\Text', 'PHP_CodeCoverage_Report_Text'); - class_alias('SebastianBergmann\CodeCoverage\Report\PHP', 'PHP_CodeCoverage_Report_PHP'); - class_alias('SebastianBergmann\CodeCoverage\Report\Clover', 'PHP_CodeCoverage_Report_Clover'); - class_alias('SebastianBergmann\CodeCoverage\Report\Html\Facade', 'PHP_CodeCoverage_Report_HTML'); - class_alias('SebastianBergmann\CodeCoverage\Exception', 'PHP_CodeCoverage_Exception'); -} - -// Autoload Codeception classes -if (!class_exists('\\Codeception\\Codecept')) { - if (file_exists(__DIR__ . '/codecept.phar')) { - require_once 'phar://'.__DIR__ . '/codecept.phar/autoload.php'; - } elseif (stream_resolve_include_path(__DIR__ . '/vendor/autoload.php')) { - require_once __DIR__ . '/vendor/autoload.php'; - // Required to load some methods only available at codeception/autoload.php - if (stream_resolve_include_path(__DIR__ . '/vendor/codeception/codeception/autoload.php')) { - require_once __DIR__ . '/vendor/codeception/codeception/autoload.php'; - } - } elseif (stream_resolve_include_path('Codeception/autoload.php')) { - require_once 'Codeception/autoload.php'; - } else { - __c3_error('Codeception is not loaded. Please check that either PHAR or Composer or PEAR package can be used'); - } -} - -// Load Codeception Config -$config_dist_file = realpath(__DIR__) . DIRECTORY_SEPARATOR . 'codeception.dist.yml'; -$config_file = realpath(__DIR__) . DIRECTORY_SEPARATOR . 'codeception.yml'; - -if (isset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_CONFIG'])) { - $config_file = realpath(__DIR__) . DIRECTORY_SEPARATOR . $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_CONFIG']; -} -if (file_exists($config_file)) { - // Use codeception.yml for configuration. -} elseif (file_exists($config_dist_file)) { - // Use codeception.dist.yml for configuration. - $config_file = $config_dist_file; -} else { - __c3_error(sprintf("Codeception config file '%s' not found", $config_file)); -} -try { - \Codeception\Configuration::config($config_file); -} catch (\Exception $e) { - __c3_error($e->getMessage()); -} - -if (!defined('C3_CODECOVERAGE_MEDIATE_STORAGE')) { - - // workaround for 'zend_mm_heap corrupted' problem - gc_disable(); - - if ((integer)ini_get('memory_limit') < 384) { - ini_set('memory_limit', '384M'); - } - - define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp'); - define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir()); - define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']); - - function __c3_build_html_report(PHP_CodeCoverage $codeCoverage, $path) - { - $writer = new PHP_CodeCoverage_Report_HTML(); - $writer->process($codeCoverage, $path . 'html'); - - if (file_exists($path . '.tar')) { - unlink($path . '.tar'); - } - - $phar = new PharData($path . '.tar'); - $phar->setSignatureAlgorithm(Phar::SHA1); - $files = $phar->buildFromDirectory($path . 'html'); - array_map('unlink', $files); - - if (in_array('GZ', Phar::getSupportedCompression())) { - if (file_exists($path . '.tar.gz')) { - unlink($path . '.tar.gz'); - } - - $phar->compress(\Phar::GZ); - - // close the file so that we can rename it - unset($phar); - - unlink($path . '.tar'); - rename($path . '.tar.gz', $path . '.tar'); - } - - return $path . '.tar'; - } - - function __c3_build_clover_report(PHP_CodeCoverage $codeCoverage, $path) - { - $writer = new PHP_CodeCoverage_Report_Clover(); - $writer->process($codeCoverage, $path . '.clover.xml'); - - return $path . '.clover.xml'; - } - - function __c3_send_file($filename) - { - if (!headers_sent()) { - readfile($filename); - } - - return __c3_exit(); - } - - /** - * @param $filename - * @return null|PHP_CodeCoverage - */ - function __c3_factory($filename) - { - $phpCoverage = is_readable($filename) - ? unserialize(file_get_contents($filename)) - : new PHP_CodeCoverage(); - - - if (isset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_SUITE'])) { - $suite = $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_SUITE']; - try { - $settings = \Codeception\Configuration::suiteSettings($suite, \Codeception\Configuration::config()); - } catch (Exception $e) { - __c3_error($e->getMessage()); - } - } else { - $settings = \Codeception\Configuration::config(); - } - - try { - \Codeception\Coverage\Filter::setup($phpCoverage) - ->whiteList($settings) - ->blackList($settings); - } catch (Exception $e) { - __c3_error($e->getMessage()); - } - - return $phpCoverage; - } - - function __c3_exit() - { - if (!isset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG'])) { - exit; - } - return null; - } - - function __c3_clear() - { - \Codeception\Util\FileSystem::doEmptyDir(C3_CODECOVERAGE_MEDIATE_STORAGE); - } -} - -if (!is_dir(C3_CODECOVERAGE_MEDIATE_STORAGE)) { - if (mkdir(C3_CODECOVERAGE_MEDIATE_STORAGE, 0777, true) === false) { - __c3_error('Failed to create directory "' . C3_CODECOVERAGE_MEDIATE_STORAGE . '"'); - } -} - -// evaluate base path for c3-related files -$path = realpath(C3_CODECOVERAGE_MEDIATE_STORAGE) . DIRECTORY_SEPARATOR . 'codecoverage'; - -$requested_c3_report = (strpos($_SERVER['REQUEST_URI'], 'c3/report') !== false); - -$complete_report = $current_report = $path . '.serialized'; -if ($requested_c3_report) { - set_time_limit(0); - - $route = ltrim(strrchr($_SERVER['REQUEST_URI'], '/'), '/'); - - if ($route == 'clear') { - __c3_clear(); - return __c3_exit(); - } - - $codeCoverage = __c3_factory($complete_report); - - switch ($route) { - case 'html': - try { - __c3_send_file(__c3_build_html_report($codeCoverage, $path)); - } catch (Exception $e) { - __c3_error($e->getMessage()); - } - return __c3_exit(); - case 'clover': - try { - __c3_send_file(__c3_build_clover_report($codeCoverage, $path)); - } catch (Exception $e) { - __c3_error($e->getMessage()); - } - return __c3_exit(); - case 'serialized': - try { - __c3_send_file($complete_report); - } catch (Exception $e) { - __c3_error($e->getMessage()); - } - return __c3_exit(); - } - -} else { - $codeCoverage = __c3_factory($current_report); - $codeCoverage->start(C3_CODECOVERAGE_TESTNAME); - if (!array_key_exists('HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG', $_SERVER)) { - register_shutdown_function( - function () use ($codeCoverage, $current_report) { - - $codeCoverage->stop(); - if (!file_exists(dirname($current_report))) { // verify directory exists - if(!mkdir(dirname($current_report), 0777, true)){ - __c3_error("Can't write CodeCoverage report into $current_report"); - } - } - - file_put_contents($current_report, serialize($codeCoverage)); - } - ); - } -} - -// @codeCoverageIgnoreEnd diff --git a/codeception.yml b/codeception.yml deleted file mode 100644 index 1a9a9a6c2..000000000 --- a/codeception.yml +++ /dev/null @@ -1,20 +0,0 @@ -actor: Tester -paths: - tests: tests - log: tests/_output - data: tests/_data - support: tests/_support - envs: tests/_envs - bootstrap: _bootstrap.php -settings: - colors: true - memory_limit: 1024M -extensions: - enabled: - - Codeception\Extension\RunFailed -coverage: - enabled: true - include: - - app/* - exclude: - - app/cache/* diff --git a/composer.json b/composer.json index a73cc7c6f..13e785f93 100644 --- a/composer.json +++ b/composer.json @@ -66,22 +66,16 @@ "watson/validating": "^6.1" }, "require-dev": { - "codeception/codeception": "^4.1", - "codeception/module-asserts": "^1.2", - "codeception/module-laravel5": "^1.1", - "codeception/module-rest": "^1.2", - "codeception/module-webdriver": "^1.0", - "fzaninotto/faker": "master@dev", + "fakerphp/faker": "^1.16", + "laravel/dusk": "^6.19", + "mockery/mockery": "^1.4", "overtrue/phplint": "^3.0", "phpunit/php-token-stream": "^3.1", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^9.0", "squizlabs/php_codesniffer": "^3.5", "symfony/css-selector": "^4.4", "symfony/dom-crawler": "^4.4" }, - "suggest": { - "ext-mcrypt": "For upgrading from before v5.1 this is used to re-encrypt data" - }, "extra": { "laravel": { "dont-discover": [ @@ -101,9 +95,13 @@ }, "autoload-dev": { "classmap": [ - "tests/TestCase.php", - "tests/unit/BaseTest.php" - ] + "tests/DuskTestCase.php", + "tests/TestCase.php" + ], + "psr-4": { + "App\\": "app/", + "Tests\\": "tests/" + } }, "scripts": { "post-autoload-dump": [ @@ -120,4 +118,4 @@ "discard-changes": true, "process-timeout": 3000 } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index b678a83a8..dab82a6b5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "26519057fc0f511ac96d83f7aa419000", + "content-hash": "b2c8d40131374f1de592b1e05da0d010", "packages": [ { "name": "adldap2/adldap2", @@ -245,16 +245,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.201.0", + "version": "3.207.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "d2bb0296a3fe62fbc975075d7b06c41002a6517d" + "reference": "3120e8adc7b2b060a7eb4c3c5e2a8c25c0f95a94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d2bb0296a3fe62fbc975075d7b06c41002a6517d", - "reference": "d2bb0296a3fe62fbc975075d7b06c41002a6517d", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3120e8adc7b2b060a7eb4c3c5e2a8c25c0f95a94", + "reference": "3120e8adc7b2b060a7eb4c3c5e2a8c25c0f95a94", "shasum": "" }, "require": { @@ -330,9 +330,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.201.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.207.1" }, - "time": "2021-11-09T19:28:28+00:00" + "time": "2021-12-01T23:44:02+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1136,36 +1136,38 @@ }, { "name": "doctrine/dbal", - "version": "3.1.3", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8" + "reference": "5d54f63541d7bed1156cb5c9b79274ced61890e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/96b0053775a544b4a6ab47654dac0621be8b4cf8", - "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/5d54f63541d7bed1156cb5c9b79274ced61890e4", + "reference": "5d54f63541d7bed1156cb5c9b79274ced61890e4", "shasum": "" }, "require": { "composer/package-versions-deprecated": "^1.11.99", - "doctrine/cache": "^1.0|^2.0", + "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", - "php": "^7.3 || ^8.0" + "php": "^7.3 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" }, "require-dev": { "doctrine/coding-standard": "9.0.0", "jetbrains/phpstorm-stubs": "2021.1", - "phpstan/phpstan": "0.12.99", - "phpstan/phpstan-strict-rules": "^0.12.11", + "phpstan/phpstan": "1.2.0", + "phpstan/phpstan-strict-rules": "^1.1", "phpunit/phpunit": "9.5.10", "psalm/plugin-phpunit": "0.16.1", - "squizlabs/php_codesniffer": "3.6.0", + "squizlabs/php_codesniffer": "3.6.1", "symfony/cache": "^5.2|^6.0", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.10.0" + "vimeo/psalm": "4.13.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -1225,7 +1227,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.1.3" + "source": "https://github.com/doctrine/dbal/tree/3.2.0" }, "funding": [ { @@ -1241,7 +1243,7 @@ "type": "tidelift" } ], - "time": "2021-10-02T16:15:05+00:00" + "time": "2021-11-26T21:00:12+00:00" }, { "name": "doctrine/deprecations", @@ -2214,16 +2216,16 @@ }, { "name": "facade/ignition", - "version": "2.16.0", + "version": "2.17.2", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "23400e6cc565c9dcae2c53704b4de1c4870c0697" + "reference": "af3cd70d58ca3ef5189ff0e59efbe5a5c043e2d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/23400e6cc565c9dcae2c53704b4de1c4870c0697", - "reference": "23400e6cc565c9dcae2c53704b4de1c4870c0697", + "url": "https://api.github.com/repos/facade/ignition/zipball/af3cd70d58ca3ef5189ff0e59efbe5a5c043e2d2", + "reference": "af3cd70d58ca3ef5189ff0e59efbe5a5c043e2d2", "shasum": "" }, "require": { @@ -2240,6 +2242,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", + "livewire/livewire": "^2.4", "mockery/mockery": "^1.3", "orchestra/testbench": "^5.0|^6.0", "psalm/plugin-laravel": "^1.2" @@ -2287,7 +2290,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-10-28T11:47:23+00:00" + "time": "2021-11-29T14:04:22+00:00" }, { "name": "facade/ignition-contracts", @@ -2607,16 +2610,16 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "296c015dc30ec4322168c5ad3ee5cc11dae827ac" + "reference": "0690bde05318336c7221785f2a932467f98b64ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/296c015dc30ec4322168c5ad3ee5cc11dae827ac", - "reference": "296c015dc30ec4322168c5ad3ee5cc11dae827ac", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", + "reference": "0690bde05318336c7221785f2a932467f98b64ca", "shasum": "" }, "require": { @@ -2639,7 +2642,8 @@ "authors": [ { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "An Implementation Of The Result Type", @@ -2652,7 +2656,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.3" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" }, "funding": [ { @@ -2664,7 +2668,7 @@ "type": "tidelift" } ], - "time": "2021-10-17T19:48:54+00:00" + "time": "2021-11-21T21:41:47+00:00" }, { "name": "guzzlehttp/guzzle", @@ -3109,16 +3113,16 @@ }, { "name": "laravel/framework", - "version": "v8.70.1", + "version": "v8.74.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "f4b69fac9292df1a8afd5eb93e77990444ad5077" + "reference": "004ea195012d5132eca07a176a6e587c6a74815e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/f4b69fac9292df1a8afd5eb93e77990444ad5077", - "reference": "f4b69fac9292df1a8afd5eb93e77990444ad5077", + "url": "https://api.github.com/repos/laravel/framework/zipball/004ea195012d5132eca07a176a6e587c6a74815e", + "reference": "004ea195012d5132eca07a176a6e587c6a74815e", "shasum": "" }, "require": { @@ -3140,15 +3144,15 @@ "psr/simple-cache": "^1.0", "ramsey/uuid": "^4.2.2", "swiftmailer/swiftmailer": "^6.3", - "symfony/console": "^5.1.4", - "symfony/error-handler": "^5.1.4", - "symfony/finder": "^5.1.4", - "symfony/http-foundation": "^5.1.4", - "symfony/http-kernel": "^5.1.4", - "symfony/mime": "^5.1.4", - "symfony/process": "^5.1.4", - "symfony/routing": "^5.1.4", - "symfony/var-dumper": "^5.1.4", + "symfony/console": "^5.4", + "symfony/error-handler": "^5.4", + "symfony/finder": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/routing": "^5.4", + "symfony/var-dumper": "^5.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", "vlucas/phpdotenv": "^5.2", "voku/portable-ascii": "^1.4.8" @@ -3195,21 +3199,21 @@ }, "require-dev": { "aws/aws-sdk-php": "^3.198.1", - "doctrine/dbal": "^2.13.3|^3.1.2", + "doctrine/dbal": "^2.13.3|^3.1.4", "filp/whoops": "^2.14.3", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^6.23", + "orchestra/testbench-core": "^6.27", "pda/pheanstalk": "^4.0", "phpunit/phpunit": "^8.5.19|^9.5.8", "predis/predis": "^1.1.9", - "symfony/cache": "^5.1.4" + "symfony/cache": "^5.4" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", @@ -3230,9 +3234,9 @@ "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, @@ -3277,7 +3281,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-11-09T16:50:33+00:00" + "time": "2021-11-30T15:26:05+00:00" }, { "name": "laravel/helpers", @@ -3414,16 +3418,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b" + "reference": "25de3be1bca1b17d52ff0dc02b646c667ac7266c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/6cfc678735f22ccedad761b8cae2bab14c3d8e5b", - "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/25de3be1bca1b17d52ff0dc02b646c667ac7266c", + "reference": "25de3be1bca1b17d52ff0dc02b646c667ac7266c", "shasum": "" }, "require": { @@ -3469,7 +3473,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2021-10-07T14:00:57+00:00" + "time": "2021-11-30T15:53:04+00:00" }, { "name": "laravel/slack-notification-channel", @@ -3602,25 +3606,28 @@ }, { "name": "laravel/ui", - "version": "v3.3.2", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "28f3d190fe270b6dcd6fdab4a77a392e693ceca5" + "reference": "b3e804559bf3973ecca160a4ae1068e6c7c167c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/28f3d190fe270b6dcd6fdab4a77a392e693ceca5", - "reference": "28f3d190fe270b6dcd6fdab4a77a392e693ceca5", + "url": "https://api.github.com/repos/laravel/ui/zipball/b3e804559bf3973ecca160a4ae1068e6c7c167c6", + "reference": "b3e804559bf3973ecca160a4ae1068e6c7c167c6", "shasum": "" }, "require": { - "illuminate/console": "^8.42", - "illuminate/filesystem": "^8.42", - "illuminate/support": "^8.42", - "illuminate/validation": "^8.42", + "illuminate/console": "^8.42|^9.0", + "illuminate/filesystem": "^8.42|^9.0", + "illuminate/support": "^8.42|^9.0", + "illuminate/validation": "^8.42|^9.0", "php": "^7.3|^8.0" }, + "require-dev": { + "orchestra/testbench": "^6.23|^7.0" + }, "type": "library", "extra": { "branch-alias": { @@ -3654,9 +3661,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v3.3.2" + "source": "https://github.com/laravel/ui/tree/v3.4.0" }, - "time": "2021-11-05T08:25:44+00:00" + "time": "2021-11-30T16:22:00+00:00" }, { "name": "laravelcollective/html", @@ -4060,16 +4067,16 @@ }, { "name": "league/csv", - "version": "9.7.2", + "version": "9.7.4", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "8544655c460fd01eed0ad258e514488d4b388645" + "reference": "002f55f649e7511710dc7154ff44c7be32c8195c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/8544655c460fd01eed0ad258e514488d4b388645", - "reference": "8544655c460fd01eed0ad258e514488d4b388645", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/002f55f649e7511710dc7154ff44c7be32c8195c", + "reference": "002f55f649e7511710dc7154ff44c7be32c8195c", "shasum": "" }, "require": { @@ -4081,9 +4088,9 @@ "ext-curl": "*", "ext-dom": "*", "friendsofphp/php-cs-fixer": "^3.0", - "phpstan/phpstan": "^0.12.99", - "phpstan/phpstan-phpunit": "^0.12.22", - "phpstan/phpstan-strict-rules": "^0.12.11", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5" }, "suggest": { @@ -4140,7 +4147,7 @@ "type": "github" } ], - "time": "2021-10-05T19:41:46+00:00" + "time": "2021-11-30T07:09:34+00:00" }, { "name": "league/event", @@ -4198,16 +4205,16 @@ }, { "name": "league/flysystem", - "version": "1.1.5", + "version": "1.1.8", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea" + "reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea", - "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c995bb0c23c58c9813d081f9523c9b7bb496698e", + "reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e", "shasum": "" }, "require": { @@ -4280,7 +4287,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.5" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.8" }, "funding": [ { @@ -4288,7 +4295,7 @@ "type": "other" } ], - "time": "2021-08-17T13:49:42+00:00" + "time": "2021-11-28T21:50:23+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -4394,16 +4401,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.8.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "b38b25d7b372e9fddb00335400467b223349fd7e" + "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e", - "reference": "b38b25d7b372e9fddb00335400467b223349fd7e", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69", + "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69", "shasum": "" }, "require": { @@ -4411,7 +4418,7 @@ "php": "^7.2 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", + "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", "phpunit/phpunit": "^8.5.8 || ^9.3" }, @@ -4434,7 +4441,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0" }, "funding": [ { @@ -4446,7 +4453,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T08:23:19+00:00" + "time": "2021-11-21T11:48:40+00:00" }, { "name": "league/oauth2-server", @@ -4537,16 +4544,16 @@ }, { "name": "livewire/livewire", - "version": "v2.7.2", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "991e5bd8a48e450d23cd55336964f916e92a6464" + "reference": "0f846a93369109e445f0e5009741b1e19e6fa6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/991e5bd8a48e450d23cd55336964f916e92a6464", - "reference": "991e5bd8a48e450d23cd55336964f916e92a6464", + "url": "https://api.github.com/repos/livewire/livewire/zipball/0f846a93369109e445f0e5009741b1e19e6fa6f6", + "reference": "0f846a93369109e445f0e5009741b1e19e6fa6f6", "shasum": "" }, "require": { @@ -4597,28 +4604,28 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.7.2" + "source": "https://github.com/livewire/livewire/tree/v2.8.1" }, "funding": [ { - "url": "https://github.com/calebporzio", + "url": "https://github.com/livewire", "type": "github" } ], - "time": "2021-10-20T02:27:35+00:00" + "time": "2021-12-02T01:31:26+00:00" }, { "name": "maatwebsite/excel", - "version": "3.1.33", + "version": "3.1.34", "source": { "type": "git", - "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8" + "url": "https://github.com/SpartnerNL/Laravel-Excel.git", + "reference": "d7446f0e808d83be128835c4b403c9e4a65b20f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8", - "reference": "b2de5ba92c5c1ad9415f0eb7c72838fb3eaaa5b8", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/d7446f0e808d83be128835c4b403c9e4a65b20f3", + "reference": "d7446f0e808d83be128835c4b403c9e4a65b20f3", "shasum": "" }, "require": { @@ -4654,7 +4661,7 @@ "authors": [ { "name": "Patrick Brouwers", - "email": "patrick@maatwebsite.nl" + "email": "patrick@spartner.nl" } ], "description": "Supercharged Excel exports and imports in Laravel", @@ -4670,8 +4677,8 @@ "phpspreadsheet" ], "support": { - "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", - "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.33" + "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.34" }, "funding": [ { @@ -4683,7 +4690,7 @@ "type": "github" } ], - "time": "2021-08-12T15:52:25+00:00" + "time": "2021-12-02T16:17:16+00:00" }, { "name": "maennchen/zipstream-php", @@ -5411,16 +5418,16 @@ }, { "name": "nette/utils", - "version": "v3.2.5", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e" + "reference": "2f261e55bd6a12057442045bf2c249806abc1d02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e", - "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e", + "url": "https://api.github.com/repos/nette/utils/zipball/2f261e55bd6a12057442045bf2c249806abc1d02", + "reference": "2f261e55bd6a12057442045bf2c249806abc1d02", "shasum": "" }, "require": { @@ -5431,7 +5438,7 @@ }, "require-dev": { "nette/tester": "~2.0", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.3" }, "suggest": { @@ -5490,22 +5497,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.5" + "source": "https://github.com/nette/utils/tree/v3.2.6" }, - "time": "2021-09-20T10:50:11+00:00" + "time": "2021-11-24T15:47:23+00:00" }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -5546,9 +5553,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "nunomaduro/collision", @@ -6244,16 +6251,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.19.0", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "a9ab55bfae02eecffb3df669a2e19ba0e2f04bbf" + "reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a9ab55bfae02eecffb3df669a2e19ba0e2f04bbf", - "reference": "a9ab55bfae02eecffb3df669a2e19ba0e2f04bbf", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/44436f270bb134b4a94670f3d020a85dfa0a3c02", + "reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02", "shasum": "" }, "require": { @@ -6274,7 +6281,7 @@ "maennchen/zipstream-php": "^2.1", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", - "php": "^7.2 || ^8.0", + "php": "^7.3 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0" @@ -6282,15 +6289,15 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "dev-master", "dompdf/dompdf": "^1.0", - "friendsofphp/php-cs-fixer": "^2.18", + "friendsofphp/php-cs-fixer": "^3.2", "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^8.0", "phpcompatibility/php-compatibility": "^9.3", - "phpstan/phpstan": "^0.12.82", - "phpstan/phpstan-phpunit": "^0.12.18", - "phpunit/phpunit": "^8.5", - "squizlabs/php_codesniffer": "^3.5", - "tecnickcom/tcpdf": "^6.3" + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.6", + "tecnickcom/tcpdf": "^6.4" }, "suggest": { "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)", @@ -6342,9 +6349,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.19.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.20.0" }, - "time": "2021-10-31T15:09:20+00:00" + "time": "2021-11-23T15:23:42+00:00" }, { "name": "phpoption/phpoption", @@ -6417,16 +6424,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.11", + "version": "3.0.12", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "6e794226a35159eb06f355efe59a0075a16551dd" + "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/6e794226a35159eb06f355efe59a0075a16551dd", - "reference": "6e794226a35159eb06f355efe59a0075a16551dd", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", + "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", "shasum": "" }, "require": { @@ -6508,7 +6515,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.11" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.12" }, "funding": [ { @@ -6524,7 +6531,7 @@ "type": "tidelift" } ], - "time": "2021-10-27T03:01:46+00:00" + "time": "2021-11-28T23:46:03+00:00" }, { "name": "phpspec/prophecy", @@ -7192,16 +7199,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.9", + "version": "v0.10.12", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "01281336c4ae557fe4a994544f30d3a1bc204375" + "reference": "a0d9981aa07ecfcbea28e4bfa868031cca121e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/01281336c4ae557fe4a994544f30d3a1bc204375", - "reference": "01281336c4ae557fe4a994544f30d3a1bc204375", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a0d9981aa07ecfcbea28e4bfa868031cca121e7d", + "reference": "a0d9981aa07ecfcbea28e4bfa868031cca121e7d", "shasum": "" }, "require": { @@ -7261,9 +7268,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.10.9" + "source": "https://github.com/bobthecow/psysh/tree/v0.10.12" }, - "time": "2021-10-10T13:37:39+00:00" + "time": "2021-11-30T14:05:36+00:00" }, { "name": "ralouphie/getallheaders", @@ -7666,30 +7673,30 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -7728,7 +7735,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" }, "funding": [ { @@ -7736,33 +7743,33 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2020-10-26T15:49:45+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -7794,7 +7801,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -7802,34 +7809,34 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -7864,14 +7871,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -7879,32 +7886,32 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -7934,7 +7941,7 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { @@ -7942,7 +7949,7 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { "name": "spatie/db-dumper", @@ -8218,30 +8225,31 @@ "type": "tidelift" } ], + "abandoned": "symfony/mailer", "time": "2021-10-18T15:26:12+00:00" }, { "name": "symfony/console", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3" + "reference": "ec3661faca1d110d6c307e124b44f99ac54179e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", - "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", + "url": "https://api.github.com/repos/symfony/console/zipball/ec3661faca1d110d6c307e124b44f99ac54179e3", + "reference": "ec3661faca1d110d6c307e124b44f99ac54179e3", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", @@ -8256,12 +8264,12 @@ }, "require-dev": { "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -8301,7 +8309,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.10" + "source": "https://github.com/symfony/console/tree/v5.4.0" }, "funding": [ { @@ -8317,7 +8325,7 @@ "type": "tidelift" } ], - "time": "2021-10-26T09:30:15+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "symfony/css-selector", @@ -8455,16 +8463,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "shasum": "" }, "require": { @@ -8473,7 +8481,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -8502,7 +8510,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" }, "funding": [ { @@ -8518,32 +8526,35 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-07-12T14:48:14+00:00" }, { "name": "symfony/error-handler", - "version": "v5.3.7", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321" + "reference": "8433fa3145ac78df88b87a4a539118e950828126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", - "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8433fa3145ac78df88b87a4a539118e950828126", + "reference": "8433fa3145ac78df88b87a4a539118e950828126", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0" + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "require-dev": { - "symfony/deprecation-contracts": "^2.1", - "symfony/http-kernel": "^4.4|^5.0", - "symfony/serializer": "^4.4|^5.0" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/http-kernel": "^4.4|^5.0|^6.0", + "symfony/serializer": "^4.4|^5.0|^6.0" }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], "type": "library", "autoload": { "psr-4": { @@ -8570,7 +8581,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.3.7" + "source": "https://github.com/symfony/error-handler/tree/v5.4.0" }, "funding": [ { @@ -8586,26 +8597,26 @@ "type": "tidelift" } ], - "time": "2021-08-28T15:07:08+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.3.7", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "ce7b20d69c66a20939d8952b617506a44d102130" + "reference": "27d39ae126352b9fa3be5e196ccf4617897be3eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ce7b20d69c66a20939d8952b617506a44d102130", - "reference": "ce7b20d69c66a20939d8952b617506a44d102130", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/27d39ae126352b9fa3be5e196ccf4617897be3eb", + "reference": "27d39ae126352b9fa3be5e196ccf4617897be3eb", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/event-dispatcher-contracts": "^2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", "symfony/polyfill-php80": "^1.16" }, "conflict": { @@ -8617,13 +8628,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/error-handler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -8655,7 +8666,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.7" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.0" }, "funding": [ { @@ -8671,20 +8682,20 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-11-23T10:19:22+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11" + "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11", - "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", + "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", "shasum": "" }, "require": { @@ -8697,7 +8708,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -8734,7 +8745,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.0" }, "funding": [ { @@ -8750,24 +8761,25 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-07-12T14:48:14+00:00" }, { "name": "symfony/finder", - "version": "v5.3.7", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" + "reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "url": "https://api.github.com/repos/symfony/finder/zipball/d2f29dac98e96a98be467627bd49c2efb1bc2590", + "reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -8796,7 +8808,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.3.7" + "source": "https://github.com/symfony/finder/tree/v5.4.0" }, "funding": [ { @@ -8812,111 +8824,33 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/7e82f6084d7cae521a75ef2cb5c9457bbda785f4", - "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-04-11T23:07:08+00:00" + "time": "2021-11-28T15:25:38+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c" + "reference": "5ef86ac7927d2de08dc1e26eb91325f9ccbe6309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", - "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5ef86ac7927d2de08dc1e26eb91325f9ccbe6309", + "reference": "5ef86ac7927d2de08dc1e26eb91325f9ccbe6309", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php80": "^1.16" }, "require-dev": { "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0" + "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/mime": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -8947,7 +8881,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.3.10" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.0" }, "funding": [ { @@ -8963,36 +8897,35 @@ "type": "tidelift" } ], - "time": "2021-10-11T15:41:55+00:00" + "time": "2021-11-28T15:25:38+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "703e4079920468e9522b72cf47fd76ce8d795e86" + "reference": "e012f16688bcb151e965473a70d8ebaa8b1d15ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/703e4079920468e9522b72cf47fd76ce8d795e86", - "reference": "703e4079920468e9522b72cf47fd76ce8d795e86", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e012f16688bcb151e965473a70d8ebaa8b1d15ea", + "reference": "e012f16688bcb151e965473a70d8ebaa8b1d15ea", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1", - "symfony/error-handler": "^4.4|^5.0", - "symfony/event-dispatcher": "^5.0", - "symfony/http-client-contracts": "^1.1|^2", - "symfony/http-foundation": "^5.3.7", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^5.0|^6.0", + "symfony/http-foundation": "^5.3.7|^6.0", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/browser-kit": "<4.4", + "symfony/browser-kit": "<5.4", "symfony/cache": "<5.0", "symfony/config": "<5.0", "symfony/console": "<4.4", @@ -9012,19 +8945,20 @@ }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^4.4|^5.0", - "symfony/config": "^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/css-selector": "^4.4|^5.0", - "symfony/dependency-injection": "^5.3", - "symfony/dom-crawler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/routing": "^4.4|^5.0", - "symfony/stopwatch": "^4.4|^5.0", - "symfony/translation": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/config": "^5.0|^6.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/css-selector": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.3|^6.0", + "symfony/dom-crawler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/routing": "^4.4|^5.0|^6.0", + "symfony/stopwatch": "^4.4|^5.0|^6.0", + "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -9059,7 +8993,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.3.10" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.0" }, "funding": [ { @@ -9075,25 +9009,25 @@ "type": "tidelift" } ], - "time": "2021-10-29T08:36:48+00:00" + "time": "2021-11-29T16:56:53+00:00" }, { "name": "symfony/mime", - "version": "v5.3.8", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "a756033d0a7e53db389618653ae991eba5a19a11" + "reference": "d4365000217b67c01acff407573906ff91bcfb34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/a756033d0a7e53db389618653ae991eba5a19a11", - "reference": "a756033d0a7e53db389618653ae991eba5a19a11", + "url": "https://api.github.com/repos/symfony/mime/zipball/d4365000217b67c01acff407573906ff91bcfb34", + "reference": "d4365000217b67c01acff407573906ff91bcfb34", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16" @@ -9107,10 +9041,10 @@ "require-dev": { "egulias/email-validator": "^2.1.10|^3.1", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/property-access": "^4.4|^5.1", - "symfony/property-info": "^4.4|^5.1", - "symfony/serializer": "^5.2" + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/property-access": "^4.4|^5.1|^6.0", + "symfony/property-info": "^4.4|^5.1|^6.0", + "symfony/serializer": "^5.2|^6.0" }, "type": "library", "autoload": { @@ -9142,7 +9076,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.3.8" + "source": "https://github.com/symfony/mime/tree/v5.4.0" }, "funding": [ { @@ -9158,7 +9092,7 @@ "type": "tidelift" } ], - "time": "2021-09-10T12:30:38+00:00" + "time": "2021-11-23T10:19:22+00:00" }, { "name": "symfony/polyfill-ctype", @@ -9970,16 +9904,16 @@ }, { "name": "symfony/process", - "version": "v5.3.7", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" + "reference": "5be20b3830f726e019162b26223110c8f47cf274" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", + "url": "https://api.github.com/repos/symfony/process/zipball/5be20b3830f726e019162b26223110c8f47cf274", + "reference": "5be20b3830f726e019162b26223110c8f47cf274", "shasum": "" }, "require": { @@ -10012,7 +9946,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.7" + "source": "https://github.com/symfony/process/tree/v5.4.0" }, "funding": [ { @@ -10028,7 +9962,7 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-11-28T15:25:38+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -10120,21 +10054,21 @@ }, { "name": "symfony/routing", - "version": "v5.3.7", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "be865017746fe869007d94220ad3f5297951811b" + "reference": "9eeae93c32ca86746e5d38f3679e9569981038b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/be865017746fe869007d94220ad3f5297951811b", - "reference": "be865017746fe869007d94220ad3f5297951811b", + "url": "https://api.github.com/repos/symfony/routing/zipball/9eeae93c32ca86746e5d38f3679e9569981038b1", + "reference": "9eeae93c32ca86746e5d38f3679e9569981038b1", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "conflict": { @@ -10146,11 +10080,11 @@ "require-dev": { "doctrine/annotations": "^1.12", "psr/log": "^1|^2|^3", - "symfony/config": "^5.3", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" + "symfony/config": "^5.3|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/config": "For using the all-in-one router or any loader", @@ -10190,7 +10124,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.3.7" + "source": "https://github.com/symfony/routing/tree/v5.4.0" }, "funding": [ { @@ -10206,25 +10140,29 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:42:42+00:00" + "time": "2021-11-23T10:19:22+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.1" + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -10232,7 +10170,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -10269,7 +10207,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" }, "funding": [ { @@ -10285,20 +10223,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2021-11-04T16:48:04+00:00" }, { "name": "symfony/string", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" + "reference": "9ffaaba53c61ba75a3c7a3a779051d1e9ec4fd2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "url": "https://api.github.com/repos/symfony/string/zipball/9ffaaba53c61ba75a3c7a3a779051d1e9ec4fd2d", + "reference": "9ffaaba53c61ba75a3c7a3a779051d1e9ec4fd2d", "shasum": "" }, "require": { @@ -10309,11 +10247,14 @@ "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "~1.15" }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { @@ -10352,7 +10293,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.10" + "source": "https://github.com/symfony/string/tree/v5.4.0" }, "funding": [ { @@ -10368,31 +10309,32 @@ "type": "tidelift" } ], - "time": "2021-10-27T18:21:46+00:00" + "time": "2021-11-24T10:02:00+00:00" }, { "name": "symfony/translation", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa" + "reference": "6fe32b10e912a518805bc9eafc2a87145773cf13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa", - "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa", + "url": "https://api.github.com/repos/symfony/translation/zipball/6fe32b10e912a518805bc9eafc2a87145773cf13", + "reference": "6fe32b10e912a518805bc9eafc2a87145773cf13", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^2.3" }, "conflict": { "symfony/config": "<4.4", + "symfony/console": "<5.3", "symfony/dependency-injection": "<5.0", "symfony/http-kernel": "<5.0", "symfony/twig-bundle": "<5.0", @@ -10403,15 +10345,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/http-kernel": "^5.0", - "symfony/intl": "^4.4|^5.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.0|^6.0", + "symfony/intl": "^4.4|^5.0|^6.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^4.4|^5.0" + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -10447,7 +10390,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.10" + "source": "https://github.com/symfony/translation/tree/v5.4.0" }, "funding": [ { @@ -10463,20 +10406,20 @@ "type": "tidelift" } ], - "time": "2021-10-10T06:43:24+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95" + "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", + "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", "shasum": "" }, "require": { @@ -10488,7 +10431,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -10525,7 +10468,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" }, "funding": [ { @@ -10541,20 +10484,20 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-08-17T14:20:01+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "875432adb5f5570fff21036fd22aee244636b7d1" + "reference": "89ab66eaef230c9cd1992de2e9a1b26652b127b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/875432adb5f5570fff21036fd22aee244636b7d1", - "reference": "875432adb5f5570fff21036fd22aee244636b7d1", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89ab66eaef230c9cd1992de2e9a1b26652b127b9", + "reference": "89ab66eaef230c9cd1992de2e9a1b26652b127b9", "shasum": "" }, "require": { @@ -10568,8 +10511,9 @@ }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -10613,7 +10557,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.10" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.0" }, "funding": [ { @@ -10629,20 +10573,20 @@ "type": "tidelift" } ], - "time": "2021-10-26T09:30:15+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "tecnickcom/tc-lib-barcode", - "version": "1.17.6", + "version": "1.17.7", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-barcode.git", - "reference": "a8a7183e2be6379e522dc825a3b7a3af5394a9e7" + "reference": "5975807c1cc9d9b50377529f22a4fdb435e75b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-barcode/zipball/a8a7183e2be6379e522dc825a3b7a3af5394a9e7", - "reference": "a8a7183e2be6379e522dc825a3b7a3af5394a9e7", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-barcode/zipball/5975807c1cc9d9b50377529f22a4fdb435e75b6a", + "reference": "5975807c1cc9d9b50377529f22a4fdb435e75b6a", "shasum": "" }, "require": { @@ -10719,7 +10663,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-barcode/issues", - "source": "https://github.com/tecnickcom/tc-lib-barcode/tree/1.17.6" + "source": "https://github.com/tecnickcom/tc-lib-barcode/tree/1.17.7" }, "funding": [ { @@ -10727,7 +10671,7 @@ "type": "custom" } ], - "time": "2021-02-07T13:18:02+00:00" + "time": "2021-11-10T20:55:06+00:00" }, { "name": "tecnickcom/tc-lib-color", @@ -10802,16 +10746,16 @@ }, { "name": "tightenco/collect", - "version": "v8.34.0", + "version": "v8.68.0", "source": { "type": "git", "url": "https://github.com/tighten/collect.git", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2" + "reference": "8bb884bdab8088b358074f629d8402b64efce2c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/b069783ab0c547bb894ebcf8e7f6024bb401f9d2", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2", + "url": "https://api.github.com/repos/tighten/collect/zipball/8bb884bdab8088b358074f629d8402b64efce2c0", + "reference": "8bb884bdab8088b358074f629d8402b64efce2c0", "shasum": "" }, "require": { @@ -10850,9 +10794,9 @@ ], "support": { "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/v8.34.0" + "source": "https://github.com/tighten/collect/tree/v8.68.0" }, - "time": "2021-03-29T21:29:00+00:00" + "time": "2021-11-30T18:41:31+00:00" }, { "name": "tightenco/ziggy", @@ -11039,16 +10983,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "accaddf133651d4b5cf81a119f25296736ffc850" + "reference": "d4394d044ed69a8f244f3445bcedf8a0d7fe2403" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", - "reference": "accaddf133651d4b5cf81a119f25296736ffc850", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/d4394d044ed69a8f244f3445bcedf8a0d7fe2403", + "reference": "d4394d044ed69a8f244f3445bcedf8a0d7fe2403", "shasum": "" }, "require": { @@ -11071,7 +11015,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.4-dev" } }, "autoload": { @@ -11101,7 +11045,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.0" }, "funding": [ { @@ -11113,7 +11057,7 @@ "type": "tidelift" } ], - "time": "2021-10-02T19:24:42+00:00" + "time": "2021-11-10T01:08:39+00:00" }, { "name": "voku/portable-ascii", @@ -11304,606 +11248,42 @@ ], "packages-dev": [ { - "name": "behat/gherkin", - "version": "v4.9.0", + "name": "fakerphp/faker", + "version": "v1.16.0", "source": { "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", "shasum": "" }, "require": { - "php": "~7.2|~8.0" - }, - "require-dev": { - "cucumber/cucumber": "dev-gherkin-22.0.0", - "phpunit/phpunit": "~8|~9", - "symfony/yaml": "~3|~4|~5" - }, - "suggest": { - "symfony/yaml": "If you want to parse features, represented in YAML files" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Gherkin": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Gherkin DSL parser for PHP", - "homepage": "http://behat.org/", - "keywords": [ - "BDD", - "Behat", - "Cucumber", - "DSL", - "gherkin", - "parser" - ], - "support": { - "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" - }, - "time": "2021-10-12T13:05:09+00:00" - }, - { - "name": "codeception/codeception", - "version": "4.1.22", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "9777ec3690ceedc4bce2ed13af7af4ca4ee3088f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/9777ec3690ceedc4bce2ed13af7af4ca4ee3088f", - "reference": "9777ec3690ceedc4bce2ed13af7af4ca4ee3088f", - "shasum": "" - }, - "require": { - "behat/gherkin": "^4.4.0", - "codeception/lib-asserts": "^1.0", - "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0", - "codeception/stub": "^2.0 | ^3.0", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/psr7": "^1.4 | ^2.0", - "php": ">=5.6.0 <9.0", - "symfony/console": ">=2.7 <6.0", - "symfony/css-selector": ">=2.7 <6.0", - "symfony/event-dispatcher": ">=2.7 <6.0", - "symfony/finder": ">=2.7 <6.0", - "symfony/yaml": ">=2.7 <6.0" - }, - "require-dev": { - "codeception/module-asserts": "1.*@dev", - "codeception/module-cli": "1.*@dev", - "codeception/module-db": "1.*@dev", - "codeception/module-filesystem": "1.*@dev", - "codeception/module-phpbrowser": "1.*@dev", - "codeception/specify": "~0.3", - "codeception/util-universalframework": "*@dev", - "monolog/monolog": "~1.8", - "squizlabs/php_codesniffer": "~2.0", - "symfony/process": ">=2.7 <6.0", - "vlucas/phpdotenv": "^2.0 | ^3.0 | ^4.0 | ^5.0" - }, - "suggest": { - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "hoa/console": "For interactive console functionality", - "stecman/symfony-console-completion": "For BASH autocompletion", - "symfony/phpunit-bridge": "For phpunit-bridge support" - }, - "bin": [ - "codecept" - ], - "type": "library", - "extra": { - "branch-alias": [] - }, - "autoload": { - "psr-4": { - "Codeception\\": "src/Codeception", - "Codeception\\Extension\\": "ext" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - } - ], - "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", - "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" - ], - "support": { - "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/4.1.22" - }, - "funding": [ - { - "url": "https://opencollective.com/codeception", - "type": "open_collective" - } - ], - "time": "2021-08-06T17:15:34+00:00" - }, - { - "name": "codeception/lib-asserts", - "version": "1.13.2", - "source": { - "type": "git", - "url": "https://github.com/Codeception/lib-asserts.git", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/184231d5eab66bc69afd6b9429344d80c67a33b6", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6", - "shasum": "" - }, - "require": { - "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3 | ^9.0", - "ext-dom": "*", - "php": ">=5.6.0 <9.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - }, - { - "name": "Gintautas Miselis" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" - } - ], - "description": "Assertion methods used by Codeception core and Asserts module", - "homepage": "https://codeception.com/", - "keywords": [ - "codeception" - ], - "support": { - "issues": "https://github.com/Codeception/lib-asserts/issues", - "source": "https://github.com/Codeception/lib-asserts/tree/1.13.2" - }, - "time": "2020-10-21T16:26:20+00:00" - }, - { - "name": "codeception/lib-innerbrowser", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/Codeception/lib-innerbrowser.git", - "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", - "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", - "shasum": "" - }, - "require": { - "codeception/codeception": "4.*@dev", - "ext-dom": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.6.0 <9.0", - "symfony/browser-kit": ">=2.7 <6.0", - "symfony/dom-crawler": ">=2.7 <6.0" + "php": "^7.1 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2" }, "conflict": { - "codeception/codeception": "<4.0" - }, - "require-dev": { - "codeception/util-universalframework": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - }, - { - "name": "Gintautas Miselis" - } - ], - "description": "Parent library for all Codeception framework modules and PhpBrowser", - "homepage": "https://codeception.com/", - "keywords": [ - "codeception" - ], - "support": { - "issues": "https://github.com/Codeception/lib-innerbrowser/issues", - "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.5.1" - }, - "time": "2021-08-30T15:21:42+00:00" - }, - { - "name": "codeception/module-asserts", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/Codeception/module-asserts.git", - "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/59374f2fef0cabb9e8ddb53277e85cdca74328de", - "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de", - "shasum": "" - }, - "require": { - "codeception/codeception": "*@dev", - "codeception/lib-asserts": "^1.13.1", - "php": ">=5.6.0 <9.0" - }, - "conflict": { - "codeception/codeception": "<4.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" - } - ], - "description": "Codeception module containing various assertions", - "homepage": "https://codeception.com/", - "keywords": [ - "assertions", - "asserts", - "codeception" - ], - "support": { - "issues": "https://github.com/Codeception/module-asserts/issues", - "source": "https://github.com/Codeception/module-asserts/tree/1.3.1" - }, - "time": "2020-10-21T16:48:15+00:00" - }, - { - "name": "codeception/module-laravel5", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/Codeception/module-laravel5.git", - "reference": "1d8a82f78a6e8c26f49af65d9001fa311785d54b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-laravel5/zipball/1d8a82f78a6e8c26f49af65d9001fa311785d54b", - "reference": "1d8a82f78a6e8c26f49af65d9001fa311785d54b", - "shasum": "" - }, - "require": { - "codeception/codeception": "^4.0", - "codeception/lib-innerbrowser": "^1.0", - "php": ">=5.6.0 <9.0" - }, - "require-dev": { - "codeception/module-asserts": "^1.0", - "codeception/module-rest": "^1.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan-Henk Gerritsen" - }, - { - "name": "Michael Bodnarchuk" - } - ], - "description": "Codeception module for Laravel 5 framework", - "homepage": "http://codeception.com/", - "keywords": [ - "codeception", - "laravel5" - ], - "support": { - "issues": "https://github.com/Codeception/module-laravel5/issues", - "source": "https://github.com/Codeception/module-laravel5/tree/1.1.1" - }, - "time": "2020-10-28T07:00:17+00:00" - }, - { - "name": "codeception/module-rest", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/Codeception/module-rest.git", - "reference": "2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-rest/zipball/2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b", - "reference": "2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b", - "shasum": "" - }, - "require": { - "codeception/codeception": "^4.0", - "justinrainbow/json-schema": "~5.2.9", - "php": ">=5.6.6 <9.0", - "softcreatr/jsonpath": "^0.5 || ^0.7" - }, - "require-dev": { - "codeception/lib-innerbrowser": "^1.0", - "codeception/util-universalframework": "^1.0" - }, - "suggest": { - "aws/aws-sdk-php": "For using AWS Auth" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gintautas Miselis" - } - ], - "description": "REST module for Codeception", - "homepage": "http://codeception.com/", - "keywords": [ - "codeception", - "rest" - ], - "support": { - "issues": "https://github.com/Codeception/module-rest/issues", - "source": "https://github.com/Codeception/module-rest/tree/1.3.2" - }, - "time": "2021-10-08T09:33:46+00:00" - }, - { - "name": "codeception/module-webdriver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/baa18b7bf70aa024012f967b5ce5021e1faa9151", - "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151", - "shasum": "" - }, - "require": { - "codeception/codeception": "^4.0", - "php": ">=5.6.0 <9.0", - "php-webdriver/webdriver": "^1.8.0" - }, - "suggest": { - "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" - }, - { - "name": "Zaahid Bateson" - } - ], - "description": "WebDriver module for Codeception", - "homepage": "http://codeception.com/", - "keywords": [ - "acceptance-testing", - "browser-testing", - "codeception" - ], - "support": { - "issues": "https://github.com/Codeception/module-webdriver/issues", - "source": "https://github.com/Codeception/module-webdriver/tree/1.4.0" - }, - "time": "2021-09-02T12:01:02+00:00" - }, - { - "name": "codeception/phpunit-wrapper", - "version": "8.1.4", - "source": { - "type": "git", - "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0", - "phpunit/phpunit": "^8.0", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0" - }, - "require-dev": { - "codeception/specify": "*", - "vlucas/phpdotenv": "^3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Codeception\\PHPUnit\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Davert", - "email": "davert.php@resend.cc" - } - ], - "description": "PHPUnit classes used by Codeception", - "support": { - "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.4" - }, - "time": "2020-12-28T14:00:08+00:00" - }, - { - "name": "codeception/stub", - "version": "3.7.0", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Stub.git", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304", - "shasum": "" - }, - "require": { - "phpunit/phpunit": "^8.4 | ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Codeception\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", - "support": { - "issues": "https://github.com/Codeception/Stub/issues", - "source": "https://github.com/Codeception/Stub/tree/3.7.0" - }, - "time": "2020-07-03T15:54:43+00:00" - }, - { - "name": "fzaninotto/faker", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/5ffe7db6c80f441f150fc88008d64e64af66634b", - "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0 || ^8.0" + "fzaninotto/faker": "*" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" + "symfony/phpunit-bridge": "^4.4 || ^5.2" + }, + "suggest": { + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "v1.16-dev" } }, "autoload": { @@ -11927,46 +11307,111 @@ "fixtures" ], "support": { - "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/master" + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" }, - "abandoned": true, - "time": "2020-12-11T09:59:14+00:00" + "time": "2021-09-06T14:53:37+00:00" }, { - "name": "justinrainbow/json-schema", - "version": "5.2.11", + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" }, - "bin": [ - "bin/validate-json" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "laravel/dusk", + "version": "v6.19.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/dusk.git", + "reference": "c042f8d389b8fdcd9543032d1ef8dbe47c8a245f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/dusk/zipball/c042f8d389b8fdcd9543032d1ef8dbe47c8a245f", + "reference": "c042f8d389b8fdcd9543032d1ef8dbe47c8a245f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-zip": "*", + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "nesbot/carbon": "^2.0", + "php": "^7.2|^8.0", + "php-webdriver/webdriver": "^1.9.0", + "symfony/console": "^4.3|^5.0", + "symfony/finder": "^4.3|^5.0", + "symfony/process": "^4.3|^5.0", + "vlucas/phpdotenv": "^3.0|^4.0|^5.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.16|^5.17.1|^6.12.1", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0" + }, + "suggest": { + "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Dusk\\DuskServiceProvider" + ] } }, "autoload": { "psr-4": { - "JsonSchema\\": "src/JsonSchema/" + "Laravel\\Dusk\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -11975,33 +11420,93 @@ ], "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" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", + "description": "Laravel Dusk provides simple end-to-end testing and browser automation.", "keywords": [ - "json", - "schema" + "laravel", + "testing", + "webdriver" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "issues": "https://github.com/laravel/dusk/issues", + "source": "https://github.com/laravel/dusk/tree/v6.19.2" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2021-10-20T10:10:26+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.4.4", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.4" + }, + "time": "2021-09-13T15:28:59+00:00" }, { "name": "myclabs/deep-copy", @@ -12103,16 +11608,16 @@ }, { "name": "overtrue/phplint", - "version": "3.0.0", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/overtrue/phplint.git", - "reference": "2d68ee8ab9083041a297cb6897ccec6290814c88" + "reference": "b4212c2c65bf50f6c823ab8e7c13c9ead9433241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/phplint/zipball/2d68ee8ab9083041a297cb6897ccec6290814c88", - "reference": "2d68ee8ab9083041a297cb6897ccec6290814c88", + "url": "https://api.github.com/repos/overtrue/phplint/zipball/b4212c2c65bf50f6c823ab8e7c13c9ead9433241", + "reference": "b4212c2c65bf50f6c823ab8e7c13c9ead9433241", "shasum": "" }, "require": { @@ -12167,9 +11672,15 @@ ], "support": { "issues": "https://github.com/overtrue/phplint/issues", - "source": "https://github.com/overtrue/phplint/tree/3.0.0" + "source": "https://github.com/overtrue/phplint/tree/3.0.6" }, - "time": "2021-06-02T13:27:41+00:00" + "funding": [ + { + "url": "https://github.com/overtrue", + "type": "github" + } + ], + "time": "2021-11-30T15:45:02+00:00" }, { "name": "phar-io/manifest", @@ -12349,40 +11860,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.15", + "version": "9.2.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "819f92bba8b001d4363065928088de22f25a3a48" + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", - "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.3 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -12410,7 +11925,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" }, "funding": [ { @@ -12418,32 +11933,32 @@ "type": "github" } ], - "time": "2021-07-26T12:20:09+00:00" + "time": "2021-11-19T15:21:02+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.4", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -12470,7 +11985,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -12478,26 +11993,97 @@ "type": "github" } ], - "time": "2021-07-19T06:46:01+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -12521,34 +12107,40 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.3", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -12574,7 +12166,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -12582,7 +12174,7 @@ "type": "github" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/php-token-stream", @@ -12646,16 +12238,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.21", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", - "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -12666,32 +12258,35 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", + "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -12699,12 +12294,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -12727,7 +12325,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -12739,32 +12337,144 @@ "type": "github" } ], - "time": "2021-09-25T07:37:20+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" } }, "autoload": { @@ -12786,7 +12496,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -12794,27 +12504,84 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "sebastian/environment", - "version": "4.2.4", + "name": "sebastian/complexity", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", "shasum": "" }, "require": { - "php": ">=7.1" + "nikic/php-parser": "^4.7", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -12822,7 +12589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -12849,7 +12616,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -12857,30 +12624,30 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -12888,7 +12655,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -12913,7 +12680,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" }, "funding": [ { @@ -12921,34 +12688,91 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.4", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.6", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" } }, "autoload": { @@ -12970,7 +12794,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -12978,79 +12802,27 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:37:18+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "shasum": "" - }, - "require": { - "php": ">=7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -13073,11 +12845,11 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -13085,32 +12857,87 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "sebastian/type", - "version": "1.1.4", + "name": "sebastian/resource-operations", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" } }, "autoload": { @@ -13133,7 +12960,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -13141,29 +12968,29 @@ "type": "github" } ], - "time": "2020-11-30T07:25:11+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -13186,74 +13013,15 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" - }, - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "softcreatr/jsonpath", - "version": "0.7.5", - "source": { - "type": "git", - "url": "https://github.com/SoftCreatR/JSONPath.git", - "reference": "008569bf80aa3584834f7890781576bc7b65afa7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SoftCreatR/JSONPath/zipball/008569bf80aa3584834f7890781576bc7b65afa7", - "reference": "008569bf80aa3584834f7890781576bc7b65afa7", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=7.1" - }, - "replace": { - "flow/jsonpath": "*" - }, - "require-dev": { - "phpunit/phpunit": ">=7.0", - "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Flow\\JSONPath\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Frank", - "email": "stephen@flowsa.com", - "homepage": "https://prismaticbytes.com", - "role": "Developer" - }, - { - "name": "Sascha Greuel", - "email": "hello@1-2.dev", - "homepage": "http://1-2.dev", - "role": "Developer" - } - ], - "description": "JSONPath implementation for parsing, searching and flattening arrays", - "support": { - "email": "hello@1-2.dev", - "forum": "https://github.com/SoftCreatR/JSONPath/discussions", - "issues": "https://github.com/SoftCreatR/JSONPath/issues", - "source": "https://github.com/SoftCreatR/JSONPath" + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://github.com/softcreatr", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-06-02T22:15:26+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -13311,78 +13079,6 @@ }, "time": "2021-10-11T04:00:11+00:00" }, - { - "name": "symfony/browser-kit", - "version": "v5.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c1e3f64fcc631c96e2c5843b666db66679ced11c", - "reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/dom-crawler": "^4.4|^5.0", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/css-selector": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/browser-kit/tree/v5.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-21T12:40:44+00:00" - }, { "name": "symfony/dom-crawler", "version": "v4.4.30", @@ -13459,28 +13155,28 @@ }, { "name": "symfony/yaml", - "version": "v5.3.6", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7" + "reference": "034ccc0994f1ae3f7499fa5b1f2e75d5e7a94efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", + "url": "https://api.github.com/repos/symfony/yaml/zipball/034ccc0994f1ae3f7499fa5b1f2e75d5e7a94efc", + "reference": "034ccc0994f1ae3f7499fa5b1f2e75d5e7a94efc", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -13514,7 +13210,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.6" + "source": "https://github.com/symfony/yaml/tree/v5.4.0" }, "funding": [ { @@ -13530,7 +13226,7 @@ "type": "tidelift" } ], - "time": "2021-07-29T06:20:01+00:00" + "time": "2021-11-28T15:25:38+00:00" }, { "name": "theseer/tokenizer", @@ -13585,9 +13281,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "fzaninotto/faker": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -13599,5 +13293,5 @@ "ext-pdo": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/database/factories/AssetFactory.php b/database/factories/AssetFactory.php index d52d25962..cdc5e29d9 100644 --- a/database/factories/AssetFactory.php +++ b/database/factories/AssetFactory.php @@ -5,7 +5,10 @@ namespace Database\Factories; use App\Models\Asset; use App\Models\AssetModel; use App\Models\Category; +use App\Models\Location; +use App\Models\Supplier; use Illuminate\Database\Eloquent\Factories\Factory; +use App\Models\StatusLabel; /* |-------------------------------------------------------------------------- @@ -36,16 +39,16 @@ class AssetFactory extends Factory { return [ 'name' => null, - 'rtd_location_id' => rand(1, 10), + 'rtd_location_id' => Location::factory()->create(), 'serial' => $this->faker->uuid, - 'status_id' => 1, + 'status_id' => StatusLabel::factory()->create()->id, 'user_id' => 1, 'asset_tag' => $this->faker->unixTime('now'), 'notes' => 'Created by DB seeder', 'purchase_date' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get()), 'purchase_cost' => $this->faker->randomFloat(2, '299.99', '2999.99'), 'order_number' => $this->faker->numberBetween(1000000, 50000000), - 'supplier_id' => 1, + 'supplier_id' => Supplier::factory()->create(), 'requestable' => $this->faker->boolean(), 'assigned_to' => null, 'assigned_type' => null, diff --git a/database/factories/AssetModelFactory.php b/database/factories/AssetModelFactory.php index 63c659fbf..187bc539f 100644 --- a/database/factories/AssetModelFactory.php +++ b/database/factories/AssetModelFactory.php @@ -3,6 +3,7 @@ namespace Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; +use App\Models\Category; /* |-------------------------------------------------------------------------- @@ -81,6 +82,7 @@ class AssetModelFactory extends Factory { return [ 'user_id' => 1, + 'name' => $this->faker->catchPhrase(), 'model_number' => $this->faker->creditCardNumber(), 'notes' => 'Created by demo seeder', @@ -93,7 +95,6 @@ class AssetModelFactory extends Factory return [ 'name' => 'Macbook Pro 13"', 'category_id' => 1, - 'manufacturer_id' => 1, 'eol' => '36', 'depreciation_id' => 1, 'image' => 'mbp.jpg', diff --git a/database/factories/CategoryFactory.php b/database/factories/CategoryFactory.php index 3001c6001..8f9dd90e3 100644 --- a/database/factories/CategoryFactory.php +++ b/database/factories/CategoryFactory.php @@ -3,6 +3,7 @@ namespace Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; +use App\Models\Category; /* |-------------------------------------------------------------------------- @@ -30,6 +31,7 @@ class CategoryFactory extends Factory public function definition() { return [ + 'name' => $this->faker->catchPhrase(), 'checkin_email' => $this->faker->boolean(), 'eula_text' => $this->faker->paragraph(), 'require_acceptance' => false, @@ -38,154 +40,143 @@ class CategoryFactory extends Factory ]; } + // usage: Category::factory()->assetLaptopCategory(); public function assetLaptopCategory() { - return $this->state(function () { - return [ - 'name' => 'Laptops', - 'category_type' => 'asset', - 'require_acceptance' => true, - ]; - }); + return Category::factory()->create([ + 'name' => 'Laptops', + 'category_type' => 'asset', + 'require_acceptance' => true, + ]); } + // usage: Category::factory()->assetDesktopCategory(); public function assetDesktopCategory() { - return $this->state(function () { - return [ - 'name' => 'Desktops', - 'category_type' => 'asset', - ]; - }); + return Category::factory()->create([ + 'name' => 'Desktops', + 'category_type' => 'asset', + 'require_acceptance' => true, + ]); } + // usage: Category::factory()->assetDisplayCategory(); public function assetDisplayCategory() { - return $this->state(function () { - return [ - 'name' => 'Displays', - 'category_type' => 'asset', - ]; - }); + return Category::factory()->create([ + 'name' => 'Displays', + 'category_type' => 'asset', + ]); } - public function assetTabletCategory() - { - return $this->state(function () { - return [ - 'name' => 'Tablets', - 'category_type' => 'asset', - ]; - }); - } + // usage: Category::factory()->assetTabletCategory(); + public function assetTabletCategory() + { + return Category::factory()->create([ + 'name' => 'Tablets', + 'category_type' => 'asset', + ]); + } - public function assetMobileCategory() - { - return $this->state(function () { - return [ - 'name' => 'Mobile Phones', - 'category_type' => 'asset', - ]; - }); - } + // usage: Category::factory()->assetMobileCategory(); + public function assetMobileCategory() + { + return Category::factory()->create([ + 'name' => 'Mobile Phones', + 'category_type' => 'asset', + ]); + } - public function assetConferenceCategory() - { - return $this->state(function () { - return [ - 'name' => 'Conference Phones', - 'category_type' => 'asset', - ]; - }); - } + // usage: Category::factory()->assetConferenceCategory(); + public function assetConferenceCategory() + { + return Category::factory()->create([ + 'name' => 'Conference Phones', + 'category_type' => 'asset', + ]); + } - public function assetVoipCategory() - { - return $this->state(function () { - return [ - 'name' => 'VOIP Phones', - 'category_type' => 'asset', - ]; - }); - } - public function accessoryKeyboardCategory() - { - return $this->state(function () { - return [ - 'name' => 'Keyboards', - 'category_type' => 'accessory', - ]; - }); - } + // usage: Category::factory()->assetVoipCategory(); + public function assetVoipCategory() + { + return Category::factory()->create([ + 'name' => 'VOIP Phones', + 'category_type' => 'asset', + ]); + } - public function accessoryMouseCategory() - { - return $this->state(function () { - return [ - 'name' => 'Mouse', - 'category_type' => 'accessory', - ]; - }); - } + // usage: Category::factory()->accessoryKeyboardCategory(); + public function accessoryKeyboardCategory() + { + return Category::factory()->create([ + 'name' => 'Keyboardss', + 'category_type' => 'accessory', + ]); + } - public function componentHddCategory() - { - return $this->state(function () { - return [ - 'name' => 'HDD/SSD', - 'category_type' => 'component', - ]; - }); - } - public function componentRamCategory() - { - return $this->state(function () { - return [ - 'name' => 'RAM', - 'category_type' => 'component', - ]; - }); - } + // usage: Category::factory()->accessoryMouseCategory(); + public function accessoryMouseCategory() + { + return Category::factory()->create([ + 'name' => 'Mouse', + 'category_type' => 'accessory', + ]); + } - public function consumablePaperCategory() - { - return $this->state(function () { - return [ - 'name' => 'Printer Paper', - 'category_type' => 'consumable', - ]; - }); - } + // usage: Category::factory()->componentHddCategory(); + public function componentHddCategory() + { + return Category::factory()->create([ + 'name' => 'HDD/SSD', + 'category_type' => 'component', + ]); + } - public function consumableInkCategory() - { - return $this->state(function () { - return [ - 'name' => 'Printer Ink', - 'category_type' => 'consumable', - ]; - }); - } + // usage: Category::factory()->componentRamCategory(); + public function componentRamCategory() + { + return Category::factory()->create([ + 'name' => 'RAM', + 'category_type' => 'component', + ]); + } - public function licenseGraphicsCategory() - { - return $this->state(function () { - return [ - 'name' => 'Graphics Software', - 'category_type' => 'license', - ]; - }); - } + // usage: Category::factory()->consumablePaperCategory(); + public function consumablePaperCategory() + { + return Category::factory()->create([ + 'name' => 'Printer Paper', + 'category_type' => 'consumable', + ]); + } + + // usage: Category::factory()->consumableInkCategory(); + public function consumableInkCategory() + { + return Category::factory()->create([ + 'name' => 'Printer Ink', + 'category_type' => 'consumable', + ]); + } + + // usage: Category::factory()->licenseGraphicsCategory(); + public function licenseGraphicsCategory() + { + return Category::factory()->create([ + 'name' => 'Graphics Software', + 'category_type' => 'license', + ]); + } + + // usage: Category::factory()->licenseGraphicsCategory(); + public function licenseOfficeCategory() + { + return Category::factory()->create([ + 'name' => 'Office Software', + 'category_type' => 'license', + ]); + } - public function licenseOfficeCategory() - { - return $this->state(function () { - return [ - 'name' => 'Office Software', - 'category_type' => 'license', - ]; - }); - } } diff --git a/database/factories/DepreciationFactory.php b/database/factories/DepreciationFactory.php index 2a1bfe4cd..17940ac51 100644 --- a/database/factories/DepreciationFactory.php +++ b/database/factories/DepreciationFactory.php @@ -30,7 +30,9 @@ class DepreciationFactory extends Factory public function definition() { return [ + 'name' => $this->faker->catchPhrase(), 'user_id' => 1, + 'months' => 36, ]; } diff --git a/database/factories/LocationFactory.php b/database/factories/LocationFactory.php index ef90f006a..f6a4bb973 100644 --- a/database/factories/LocationFactory.php +++ b/database/factories/LocationFactory.php @@ -1,36 +1,11 @@ $this->faker->city, - 'address' => $this->faker->streetAddress, - 'address2' => $this->faker->secondaryAddress, - 'city' => $this->faker->city, - 'state' => $this->faker->stateAbbr, - 'country' => $this->faker->countryCode, - 'currency' => $this->faker->currencyCode, - 'zip' => $this->faker->postcode, + 'name' => $this->faker->city(), + 'address' => $this->faker->streetAddress(), + 'address2' => $this->faker->secondaryAddress(), + 'city' => $this->faker->city(), + 'state' => $this->faker->stateAbbr(), + 'country' => $this->faker->countryCode(), + 'currency' => $this->faker->currencyCode(), + 'zip' => $this->faker->postcode(), 'image' => rand(1, 9).'.jpg', + ]; } + } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 30a502db5..5e4622109 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,19 +2,11 @@ namespace Database\Factories; -use App\Models\Company; use Illuminate\Database\Eloquent\Factories\Factory; - +use \Auth; class UserFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = \App\Models\User::class; - /** * Define the model's default state. * @@ -22,23 +14,21 @@ class UserFactory extends Factory */ public function definition() { - $password = bcrypt('password'); return [ 'activated' => 1, - 'address' => $this->faker->address, - 'city' => $this->faker->city, + 'address' => $this->faker->address(), + 'city' => $this->faker->city(), 'company_id' => rand(1, 4), - 'country' => $this->faker->country, + 'country' => $this->faker->country(), 'department_id' => rand(1, 6), 'email' => $this->faker->safeEmail, 'employee_num' => $this->faker->numberBetween(3500, 35050), - 'first_name' => $this->faker->firstName, - 'jobtitle' => $this->faker->jobTitle, - 'last_name' => $this->faker->lastName, - 'locale' => $this->faker->locale, - 'location_id' => rand(1, 5), + 'first_name' => $this->faker->firstName(), + 'jobtitle' => $this->faker->jobTitle(), + 'last_name' => $this->faker->lastName(), + 'locale' => $this->faker->locale(), 'notes' => 'Created by DB seeder', - 'password' => $password, + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'permissions' => '{"user":"0"}', 'phone' => $this->faker->phoneNumber, 'state' => $this->faker->stateAbbr, @@ -46,7 +36,7 @@ class UserFactory extends Factory 'zip' => $this->faker->postcode, ]; } - + public function firstAdmin() { return $this->state(function () { @@ -407,4 +397,5 @@ class UserFactory extends Factory ]; }); } + } diff --git a/phpunit.xml b/phpunit.xml index ad15b6f59..bf3fd2dc3 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,34 +1,22 @@ - - - - ./tests/ - - - - - app/ - - - - - - - - - - - - - - - + + + + app/ + + + + + ./tests/ + + + + + + + + + + + diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index c16d464da..0a85b6a5c 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -135,7 +135,7 @@ 'licenses_available' => 'licenses available', 'licenses' => 'Licenses', 'list_all' => 'List All', - 'loading' => 'Loading', + 'loading' => 'Loading... please wait....', 'lock_passwords' => 'This field value will not be saved in a demo installation.', 'feature_disabled' => 'This feature has been disabled for the demo installation.', 'location' => 'Location', diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 3a876654b..409b6ed59 100755 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -64,7 +64,7 @@ @if ($snipeSettings->saml_enabled)
- @@ -73,7 +73,7 @@ -
+
@if ($snipeSettings->custom_forgot_pass_url) {{ trans('auth/general.forgot_password') }} @else diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index e304c8ce0..2a915d8c9 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -64,7 +64,7 @@ return newParams; }, formatLoadingMessage: function () { - return '

Loading... please wait....

'; + return '

{{ trans('general.loading') }}

'; }, icons: { advancedSearchIcon: 'fas fa-search-plus', diff --git a/tests/Browser/LoginTest.php b/tests/Browser/LoginTest.php new file mode 100644 index 000000000..0d54dec8f --- /dev/null +++ b/tests/Browser/LoginTest.php @@ -0,0 +1,51 @@ +browse(function (Browser $browser) { + $browser->visitRoute('login') + ->assertSee(trans('auth/general.login_prompt')); + }); + + $this->browse(function ($browser) { + $browser->visitRoute('login') + ->type('username', 'snipe') + ->type('password', 'password') + ->press(trans('auth/general.login')) + ->assertPathIs('/'); + $browser->screenshot('dashboard'); + }); + } + + + /** + * Test dashboard loads + * + * @todo Flesh this out further to make sure the individual tables actually load with + * content inside them. + * + * @return void + */ + public function testDashboardLoadsWithSuperAdmin() + { + $this->browse(function ($browser) { + $browser->assertSee(trans('general.dashboard')); + $browser->assertSee(trans('general.loading')); + $browser->screenshot('dashboard-2'); + }); + + } +} diff --git a/tests/Browser/Pages/HomePage.php b/tests/Browser/Pages/HomePage.php new file mode 100644 index 000000000..26bf174f3 --- /dev/null +++ b/tests/Browser/Pages/HomePage.php @@ -0,0 +1,41 @@ + '#selector', + ]; + } +} diff --git a/tests/Browser/Pages/Page.php b/tests/Browser/Pages/Page.php new file mode 100644 index 000000000..f8d76222c --- /dev/null +++ b/tests/Browser/Pages/Page.php @@ -0,0 +1,20 @@ + '#selector', + ]; + } +} diff --git a/tests/Browser/console/.gitignore b/tests/Browser/console/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/tests/Browser/console/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/Browser/screenshots/.gitignore b/tests/Browser/screenshots/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/tests/Browser/screenshots/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/Browser/source/.gitignore b/tests/Browser/source/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/tests/Browser/source/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php new file mode 100644 index 000000000..8d8a77e99 --- /dev/null +++ b/tests/CreatesApplication.php @@ -0,0 +1,22 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} \ No newline at end of file diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php new file mode 100644 index 000000000..808af69c8 --- /dev/null +++ b/tests/DuskTestCase.php @@ -0,0 +1,61 @@ +addArguments(collect([ + '--window-size=1920,1080', + ])->unless($this->hasHeadlessDisabled(), function ($items) { + return $items->merge([ + '--disable-gpu', + '--headless', + ]); + })->all()); + + return RemoteWebDriver::create( + $_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515', + DesiredCapabilities::chrome()->setCapability( + ChromeOptions::CAPABILITY, $options + ) + ); + } + + /** + * Determine whether the Dusk command has disabled headless mode. + * + * @return bool + */ + protected function hasHeadlessDisabled() + { + return isset($_SERVER['DUSK_HEADLESS_DISABLED']) || + isset($_ENV['DUSK_HEADLESS_DISABLED']); + } +} diff --git a/tests/TODO.testing b/tests/TODO.testing deleted file mode 100644 index f4645af9d..000000000 --- a/tests/TODO.testing +++ /dev/null @@ -1,3 +0,0 @@ -* Dump should contain at least one category of each type for functional testing. -* acceptance: replace some amonpage with checking url after clicking create -* acceptance: asset model test \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index c0e60bde3..2932d4a69 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,35 +1,10 @@ make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); - - return $app; - } - - protected function setUp(): void - { - parent::setUp(); - } - - protected function tearDown(): void - { - //Artisan::call('migrate:reset'); - parent::tearDown(); - } + use CreatesApplication; } diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php new file mode 100644 index 000000000..dafcce663 --- /dev/null +++ b/tests/Unit/AccessoryTest.php @@ -0,0 +1,69 @@ +create( + [ + 'company_id' => + Company::factory()->create()->id]); + $this->assertInstanceOf(Company::class, $accessory->company); + } + + public function testAnAccessoryHasALocation() + { + $accessory = Accessory::factory() + ->create( + [ + 'location_id' => Location::factory()->create()->id + ]); + $this->assertInstanceOf(Location::class, $accessory->location); + } + + public function testAnAccessoryBelongsToACategory() + { + $accessory = Accessory::factory()->appleBtKeyboard() + ->create( + [ + 'category_id' => + Category::factory()->create( + [ + 'category_type' => 'accessory' + ] + )->id]); + $this->assertInstanceOf(Category::class, $accessory->category); + $this->assertEquals('accessory', $accessory->category->category_type); + } + + public function testAnAccessoryHasAManufacturer() + { + $this->createValidManufacturer('apple'); + $this->createValidCategory('accessory-keyboard-category'); + $accessory = Accessory::factory()->appleBtKeyboard()->create( + [ + 'category_id' => Category::factory()->create(), + 'category_id' => Manufacturer::factory()->apple()->create() + ]); + $this->assertInstanceOf(Manufacturer::class, $accessory->manufacturer); + } +} diff --git a/tests/unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php similarity index 95% rename from tests/unit/AssetMaintenanceTest.php rename to tests/Unit/AssetMaintenanceTest.php index 1ea522b7b..ccae46ed7 100644 --- a/tests/unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -1,6 +1,9 @@ eol = ''; + $this->assertTrue($am->eol === 0); + $am->eol = '4'; + $this->assertTrue($am->eol == 4); + } + + public function testAnAssetModelContainsAssets() + { + $category = Category::factory()->create( + ['category_type' => 'asset'] + ); + $model = AssetModel::factory()->create([ + 'category_id' => $category->id, + ]); + + $asset = Asset::factory() + ->create( + [ + 'model_id' => $model->id + ] + ); + $this->assertEquals(1, $model->assets()->count()); + } + + +} diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php new file mode 100644 index 000000000..0cc27d80d --- /dev/null +++ b/tests/Unit/AssetTest.php @@ -0,0 +1,70 @@ + '0012345'], + // ['asset_tag' => 'WTF00134'], + // ['asset_tag' => 'WTF-745'], + // ['asset_tag' => '0012346'], + // ['asset_tag' => '00123410'], + // ['asset_tag' => 'U8T7597h77'], + // ]) + // ); + + // \Log::debug('Next: '.$next); + // $this->assertEquals($expected, $next); + // } + + + /** + * @test + */ + public function testWarrantyExpiresAttribute() + { + + $asset = Asset::factory() + ->create( + [ + 'model_id' => AssetModel::factory() + ->create( + [ + 'category_id' => Category::factory()->assetLaptopCategory()->id + ] + )->id, + 'warranty_months' => 24, + 'purchase_date' => Carbon::createFromDate(2017, 1, 1)->hour(0)->minute(0)->second(0) + ]); + + + $this->assertEquals(Carbon::createFromDate(2017, 1, 1)->format('Y-m-d'), $asset->purchase_date->format('Y-m-d')); + $this->assertEquals(Carbon::createFromDate(2019, 1, 1)->format('Y-m-d'), $asset->warranty_expires->format('Y-m-d')); + + } + +} diff --git a/tests/unit/BaseTest.php b/tests/Unit/BaseTest.php similarity index 68% rename from tests/unit/BaseTest.php rename to tests/Unit/BaseTest.php index a2e81599b..83f118108 100644 --- a/tests/unit/BaseTest.php +++ b/tests/Unit/BaseTest.php @@ -1,18 +1,23 @@ create(); + Setting::factory()->create(); } protected function signIn($user = null) @@ -23,39 +28,38 @@ class BaseTest extends \Codeception\TestCase\Test ]); } Auth::login($user); - return $user; } - protected function createValidAssetModel($state = 'mbp-13-model', $overrides = []) + protected function createValidAssetModel() { - return \App\Models\AssetModel::factory()->state()->create(array_merge([ + return \App\Models\AssetModel::factory()->create([ 'category_id' => $this->createValidCategory(), 'manufacturer_id' => $this->createValidManufacturer(), 'depreciation_id' => $this->createValidDepreciation(), - ], $overrides)); + ]); } - protected function createValidCategory($state = 'asset-laptop-category', $overrides = []) + protected function createValidCategory() { - return \App\Models\Category::factory()->state()->create($overrides); + return \App\Models\Category::factory()->make(); } - protected function createValidCompany($overrides = []) + protected function createValidCompany() { - return \App\Models\Company::factory()->create($overrides); + return \App\Models\Company::factory()->create(); } protected function createValidDepartment($state = 'engineering', $overrides = []) { - return \App\Models\Department::factory()->state()->create(array_merge([ + return \App\Models\Department::factory()->create(array_merge([ 'location_id' => $this->createValidLocation()->id, ], $overrides)); } - protected function createValidDepreciation($state = 'computer', $overrides = []) + protected function createValidDepreciation() { - return \App\Models\Depreciation::factory()->state()->create($overrides); + return \App\Models\Depreciation::factory()->create(); } protected function createValidLocation($overrides = []) @@ -63,9 +67,9 @@ class BaseTest extends \Codeception\TestCase\Test return \App\Models\Location::factory()->create($overrides); } - protected function createValidManufacturer($state = 'apple', $overrides = []) + protected function createValidManufacturer() { - return \App\Models\Manufacturer::factory()->state()->create($overrides); + return \App\Models\Manufacturer::factory()->create(); } protected function createValidSupplier($overrides = []) diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php new file mode 100644 index 000000000..eb1c06e69 --- /dev/null +++ b/tests/Unit/CategoryTest.php @@ -0,0 +1,99 @@ +assertFalse($a->isValid()); + + $fields = [ + 'name' => 'name', + 'category_type' => 'category type', + ]; + $errors = $a->getErrors(); + foreach ($fields as $field => $fieldTitle) { + $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); + } + } + + public function testACategoryCanHaveAssets() + { + $category = Category::factory()->assetDesktopCategory(); + + // Generate 5 models via factory + $models = AssetModel::factory() + ->mbp13Model() + ->count(5) + ->create( + [ + 'category_id' => $category->id + ] + ); + + + + // Loop through the models and create 2 assets in each model + $models->each(function ($model) { + //dd($model); + $asset = Asset::factory() + ->count(2) + ->create( + [ + 'model_id' => $model->id, + ] + ); + //dd($asset); + }); + + $this->assertCount(5, $category->models); + $this->assertCount(5, $category->models); + $this->assertEquals(10, $category->itemCount()); + } + + + // public function testACategoryCanHaveAccessories() + // { + // $category = Category::factory()->assetDesktopCategory()->create(); + // Accessory::factory()->count(5)->appleBtKeyboard()->create( + // [ + // 'category_id' => $category->id + // ] + // ); + + // $this->assertCount(5, $category->accessories); + // $this->assertEquals(5, $category->itemCount()); + // } + + // public function testACategoryCanHaveConsumables() + // { + // $category = $this->createValidCategory('consumable-paper-category'); + // \App\Models\Consumable::factory()->count(5)->cardstock()->create(['category_id' => $category->id]); + // $this->assertCount(5, $category->consumables); + // $this->assertEquals(5, $category->itemCount()); + // } + + // public function testACategoryCanHaveComponents() + // { + // $category = $this->createValidCategory('component-ram-category'); + // \App\Models\Component::factory()->count(5)->ramCrucial4()->create(['category_id' => $category->id]); + // $this->assertCount(5, $category->components); + // $this->assertEquals(5, $category->itemCount()); + // } +} diff --git a/tests/Unit/CompanyTest.php b/tests/Unit/CompanyTest.php new file mode 100644 index 000000000..c5c760029 --- /dev/null +++ b/tests/Unit/CompanyTest.php @@ -0,0 +1,34 @@ +create(); + $user = User::factory() + ->create( + [ + 'company_id'=> $company->id + ] + ); + + $this->assertCount(1, $company->users); + } +} diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php new file mode 100644 index 000000000..bca8f3e67 --- /dev/null +++ b/tests/Unit/ComponentTest.php @@ -0,0 +1,54 @@ +create( + [ + 'company_id' => Company::factory()->create()->id + ] + ); + $this->assertInstanceOf(Company::class, $component->company); + } + + public function testAComponentHasALocation() + { + $component = Component::factory() + ->create(['location_id' => Location::factory()->create()->id]); + $this->assertInstanceOf(Location::class, $component->location); + } + + public function testAComponentBelongsToACategory() + { + $component = Component::factory()->ramCrucial4() + ->create( + [ + 'category_id' => + Category::factory()->create( + [ + 'category_type' => 'component' + ] + )->id]); + $this->assertInstanceOf(Category::class, $component->category); + $this->assertEquals('component', $component->category->category_type); + } +} diff --git a/tests/Unit/ConsumableTest.php b/tests/Unit/ConsumableTest.php new file mode 100644 index 000000000..cbe89b13b --- /dev/null +++ b/tests/Unit/ConsumableTest.php @@ -0,0 +1,19 @@ +createValidAssetModel(); + $depreciation = Depreciation::factory()->create(); + + AssetModel::factory() + ->mbp13Model() + ->count(5) + ->create( + [ + 'category_id' => Category::factory()->assetLaptopCategory(), + 'depreciation_id' => $depreciation->id + ]); + + + $this->assertEquals(5, $depreciation->models->count()); + } + + public function testADepreciationHasLicenses() + { + + $depreciation = Depreciation::factory()->create(); + License::factory() + ->count(5) + ->photoshop() + ->create( + [ + 'category_id' => Category::factory()->licenseGraphicsCategory(), + 'depreciation_id' => $depreciation->id + ]); + + $this->assertEquals(5, $depreciation->licenses()->count()); + } +} diff --git a/tests/Unit/ImporterTest.php b/tests/Unit/ImporterTest.php new file mode 100644 index 000000000..dcd7927c2 --- /dev/null +++ b/tests/Unit/ImporterTest.php @@ -0,0 +1,747 @@ +signIn(); +// $csv = <<<'EOT' +// Full Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,Weight +// Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,35 +// EOT; + +// $this->initializeCustomFields(); +// $this->import(new AssetImporter($csv)); + +// $this->tester->seeRecord('users', [ +// 'first_name' => 'Bonnie', +// 'last_name' => 'Nelson', +// 'email' => 'bnelson0@cdbaby.com', +// ]); +// $this->tester->seeRecord('categories', [ +// 'name' => 'quam', +// ]); + +// $this->tester->seeRecord('models', [ +// 'name' => 'massa id', +// 'model_number' => 6377018600094472, +// ]); + +// $this->tester->seeRecord('manufacturers', [ +// 'name' => 'Linkbridge', +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'Daping', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Alpha', +// ]); + +// $this->tester->seeRecord('status_labels', [ +// 'name' => 'Undeployable', +// ]); + +// $this->tester->seeRecord('suppliers', [ +// 'name' => 'Blogspan', +// ]); + +// $this->tester->seeRecord('assets', [ +// 'name' => 'eget nunc donec quis', +// 'serial' => '27aa8378-b0f4-4289-84a4-405da95c6147', +// 'asset_tag' => '970882174-8', +// 'notes' => 'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.', +// 'purchase_date' => '2016-04-05 00:00:01', +// 'purchase_cost' => 133289.59, 'warranty_months' => 14, +// '_snipeit_weight_2' => 35, +// ]); +// } + +// public function testImportCheckoutToLocation() +// { +// $this->signIn(); + +// // Testing in order: +// // * Asset to user, no checkout type defined (default to user). +// // * Asset to user, explicit user checkout type (Checkout to user) +// // * Asset to location, location does not exist to begin with +// // * Asset to preexisting location. +// $csv = <<<'EOT' +// Full Name,Email,Username,Checkout Location,Checkout Type,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,Weight +// Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,,,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,35 +// Mildred Gibson,mgibson2@wiley.com,mgibson2,,user,morbi quis tortor id,nunc nisl duis,convallis tortor risus,Lajo,374622546776765,2837ab20-8f0d-4935-8a52-226392f2b1b0,710141467-2,Shekou,In congue. Etiam justo. Etiam pretium iaculis justo.,2015-08-09,233.57,Konklab,Lost,,, +// ,,,Planet Earth,location,dictumst maecenas ut,sem praesent,accumsan felis,Layo,30052522651756,4751495c-cee0-4961-b788-94a545b5643e,998233705-X,Dante Delgado,,2016-04-16,261.79,,Archived,15,Ntag, +// ,,,Daping,location,viverra diam vitae,semper sapien,dapibus dolor vel,Flashset,3559785746335392,e287bb64-ff4f-434c-88ab-210ad433c77b,927820758-6,Achiaman,,2016-03-05,675.3,,Archived,22,Meevee, +// EOT; + +// $this->import(new AssetImporter($csv)); + +// $user = User::where('username', 'bnelson0')->firstOrFail(); + +// $this->tester->seeRecord('assets', [ +// 'asset_tag' => '970882174-8', +// 'assigned_type' => User::class, +// 'assigned_to' => $user->id, +// ]); + +// $user = User::where('username', 'mgibson2')->firstOrFail(); +// $this->tester->seeRecord('assets', [ +// 'asset_tag' => '710141467-2', +// 'assigned_type' => User::class, +// 'assigned_to' => $user->id, +// ]); + +// $location = Location::where('name', 'Planet Earth')->firstOrFail(); +// $this->tester->seeRecord('assets', [ +// 'asset_tag' => '998233705-X', +// 'assigned_type' => Location::class, +// 'assigned_to' => $location->id, +// ]); + +// $location = Location::where('name', 'Daping')->firstOrFail(); +// $this->tester->seeRecord('assets', [ +// 'asset_tag' => '927820758-6', +// 'assigned_type' => Location::class, +// 'assigned_to' => $location->id, +// ]); +// } + +// public function testUpdateAssetIncludingCustomFields() +// { +// $this->signIn(); +// $csv = <<<'EOT' +// Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,weight +// Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,95 +// EOT; + +// $this->initializeCustomFields(); +// $this->import(new AssetImporter($csv)); + +// $updatedCSV = <<<'EOT' +// item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier +// A new name,some other category,Another Model,Linkbridge 32,356,67433477,970882174-8,New Location,I have no notes,2018-04-05,25.59,Another Company,Ready To Go,18,Not Creative +// EOT; +// $importer = new AssetImporter($updatedCSV); +// $importer->setUserId(1) +// ->setUpdating(true) +// ->setUsernameFormat('firstname.lastname') +// ->import(); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'some other category', +// ]); + +// $this->tester->seeRecord('models', [ +// 'name' => 'Another Model', +// 'model_number' => 356, +// ]); + +// $this->tester->seeRecord('manufacturers', [ +// 'name' => 'Linkbridge 32', +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'New Location', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Another Company', +// ]); + +// $this->tester->seeRecord('status_labels', [ +// 'name' => 'Ready To Go', +// ]); + +// $this->tester->seeRecord('suppliers', [ +// 'name' => 'Not Creative', +// ]); + +// $this->tester->seeRecord('assets', [ +// 'name' => 'A new name', +// 'serial' => '67433477', +// 'asset_tag' => '970882174-8', +// 'notes' => 'I have no notes', +// 'purchase_date' => '2018-04-05 00:00:01', +// 'purchase_cost' => 25.59, +// 'warranty_months' => 18, +// '_snipeit_weight_2' => 95, +// ]); +// } + +// public function testAssetModelNumber4359() +// { +// // As per bug #4359 +// // 1) Create model with blank model # and custom field. +// // 2 ) Update custom fields with a csv not including model # +// // 3 ) Not updated. NULL vs. empty issue. +// $this->signIn(); +// $csv = <<<'EOT' +// Name,Email,Username,item Name,Category,Model name,Manufacturer,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier +// Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan +// EOT; + +// // Need to do this manually... +// $customField = \App\Models\CustomField::factory()->create(['name' => 'Weight']); +// $customFieldSet = \App\Models\CustomFieldset::factory()->create(['name' => 'Default']); +// $customFieldSet->fields()->attach($customField, [ +// 'required' => false, +// 'order' => 'asc', ]); + +// \App\Models\Category::factory()->assetLaptopCategory()->create([ +// 'name' => 'quam', +// ]); + +// \App\Models\Manufacturer::factory()->apple()->create([ +// 'name' => 'Linkbridge', +// ]); + +// $am = \App\Models\AssetModel::factory()->create([ +// 'name' => 'massa id', +// 'fieldset_id' => $customFieldSet->id, +// 'category_id' => 1, +// 'manufacturer_id' => 1, +// 'model_number' => null, +// ]); + +// $this->import(new AssetImporter($csv)); +// $updatedCSV = <<<'EOT' +// Serial,Asset Tag,weight +// 67433477,970882174-8,115 +// EOT; +// $importer = new AssetImporter($updatedCSV); +// $importer->setUserId(1) +// ->setUpdating(true) +// ->setUsernameFormat('firstname.lastname') +// ->import(); + +// $this->tester->seeRecord('assets', [ +// 'asset_tag' => '970882174-8', +// '_snipeit_weight_2' => 115, +// ]); +// } + +// public function initializeCustomFields() +// { +// $customField = \App\Models\CustomField::factory()->create(['name' => 'Weight']); +// $customFieldSet = \App\Models\CustomFieldset::factory()->create(['name' => 'Default']); +// $customFieldSet->fields()->attach($customField, [ +// 'required' => false, +// 'order' => 'asc', ]); + +// $am = \App\Models\AssetModel::factory()->create([ +// 'name' => 'massa id', +// 'fieldset_id' => $customFieldSet->id, +// ]); +// } + +// public function testCustomMappingImport() +// { +// $this->signIn(); +// $csv = <<<'EOT' +// Full Name,Email,Username,object name,Cat,Model name,Manufacturer,Model Number,Serial,Asset,Loc,Some Notes,Purchase Date,Purchase Cost,comp,Status,Warranty,Supplier +// Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan +// EOT; + +// $customFieldMap = [ +// 'asset_tag' => 'Asset', +// 'category' => 'Cat', +// 'company' => 'comp', +// 'item_name' => 'object name', +// 'expiration_date' => 'expiration date', +// 'location' => 'loc', +// 'notes' => 'Some Notes', +// 'asset_model' => 'model name', +// ]; + +// $this->import(new AssetImporter($csv), $customFieldMap); +// // Did we create a user? +// $this->tester->seeRecord('users', [ +// 'first_name' => 'Bonnie', +// 'last_name' => 'Nelson', +// 'email' => 'bnelson0@cdbaby.com', +// ]); +// // Grab the user record for use in asserting assigned_to +// $createdUser = $this->tester->grabRecord('users', [ +// 'first_name' => 'Bonnie', +// 'last_name' => 'Nelson', +// 'email' => 'bnelson0@cdbaby.com', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'quam', +// ]); + +// $this->tester->seeRecord('models', [ +// 'name' => 'massa id', +// 'model_number' => 6377018600094472, +// ]); + +// $this->tester->seeRecord('manufacturers', [ +// 'name' => 'Linkbridge', +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'Daping', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Alpha', +// ]); + +// $this->tester->seeRecord('status_labels', [ +// 'name' => 'Undeployable', +// ]); + +// $this->tester->seeRecord('suppliers', [ +// 'name' => 'Blogspan', +// ]); + +// $this->tester->seeRecord('assets', [ +// 'name' => 'eget nunc donec quis', +// 'serial' => '27aa8378-b0f4-4289-84a4-405da95c6147', +// 'asset_tag' => '970882174-8', +// 'notes' => 'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.', +// 'purchase_date' => '2016-04-05 00:00:01', +// 'purchase_cost' => 133289.59, +// 'warranty_months' => 14, +// 'assigned_to' => $createdUser['id'], +// 'assigned_type' => User::class, +// ]); +// } + +// public function testDefaultAccessoryImport() +// { +// $csv = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +// Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 +// EOT; +// $this->import(new AccessoryImporter($csv)); +// $this->tester->seeRecord('accessories', [ +// 'name' => 'Walter Carter', +// 'purchase_date' => '2006-09-01 00:00:01', +// 'order_number' => 'J935H60W', +// 'requestable' => 0, +// 'qty' => 278, +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'metus. Vivamus', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Macromedia', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'Customers', +// ]); +// } + +// public function testDefaultAccessoryUpdate() +// { +// $csv = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +// Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 +// EOT; +// $this->import(new AccessoryImporter($csv)); +// $this->tester->seeNumRecords(1, 'accessories'); + +// $updatedCSV = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +// Walter Carter,09/01/2015,350,metus. Vivamus,Macromedia,35GGH,Customers,True,12 +// EOT; +// $importer = new AccessoryImporter($updatedCSV); +// $importer->setUserId(1) +// ->setUpdating(true) +// ->import(); +// // At this point we should still only have one record. +// $this->tester->seeNumRecords(1, 'accessories'); +// // But instead these. +// $this->tester->seeRecord('accessories', [ +// 'name' => 'Walter Carter', +// 'purchase_date' => '2015-09-01 00:00:01', +// 'order_number' => '35GGH', +// 'requestable' => 1, +// 'qty' => 12, +// ]); +// } + +// public function testCustomAccessoryImport() +// { +// $csv = <<<'EOT' +// Name,Pur Date,Cost,Loc,Comp,Order Num,Cat,Request,Quan +// Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 +// EOT; + +// $customFieldMap = [ +// 'category' => 'Cat', +// 'company' => 'Comp', +// 'item_name' => 'Name', +// 'location' => 'Loc', +// 'purchase_date' => 'Pur Date', +// 'purchase_cost' => 'Cost', +// 'order_number' => 'Order Num', +// 'requestable' => 'Request', +// 'quantity' => 'Quan', +// ]; +// $this->import(new AccessoryImporter($csv), $customFieldMap); +// // dd($this->tester->grabRecord('accessories')); +// $this->tester->seeRecord('accessories', [ +// 'name' => 'Walter Carter', +// 'purchase_date' => '2006-09-01 00:00:01', +// 'order_number' => 'J935H60W', +// 'requestable' => 0, +// 'qty' => 278, +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'metus. Vivamus', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Macromedia', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'Customers', +// ]); +// } + +// public function testDefaultConsumableImport() +// { +// $csv = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity,Item Number,Model Number +// eget,01/03/2011,$85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322,3305,30123 +// EOT; +// $this->import(new ConsumableImporter($csv)); +// $this->tester->seeRecord('consumables', [ +// 'name' => 'eget', +// 'purchase_date' => '2011-01-03 00:00:01', +// 'purchase_cost' => 85.91, +// 'order_number' => 'T295T06V', +// 'requestable' => 0, +// 'qty' => 322, +// 'item_no' => 3305, +// 'model_number' => 30123, +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'mauris blandit mattis.', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Lycos', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'Triamterene/Hydrochlorothiazide', +// ]); +// } + +// public function testDefaultConsumableUpdate() +// { +// $csv = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +// eget,01/03/2011,85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322 +// EOT; +// $this->import(new ConsumableImporter($csv)); +// $this->tester->seeNumRecords(1, 'consumables'); + +// $updatedCSV = <<<'EOT' +// Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +// eget,12/05/2016,35.45,mauris blandit mattis.,Lycos,3666FF,New Cat,Yes,15 +// EOT; +// $importer = new ConsumableImporter($updatedCSV); +// $importer->setUserId(1) +// ->setUpdating(true) +// ->import(); +// // At this point we should still only have one record. +// $this->tester->seeNumRecords(1, 'consumables'); +// // But instead these. +// $this->tester->seeRecord('consumables', [ +// 'name' => 'eget', +// 'purchase_date' => '2016-12-05 00:00:01', +// 'purchase_cost' => 35.45, +// 'order_number' => '3666FF', +// 'requestable' => 1, +// 'qty' => 15, +// ]); +// } + +// public function testCustomConsumableImport() +// { +// $csv = <<<'EOT' +// Name,pur Date,Pur Cost,Loc,Comp,Order Num,Kat,Request,Quan +// eget,01/03/2011,85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322 +// EOT; + +// $customFieldMap = [ +// 'category' => 'Kat', +// 'company' => 'Comp', +// 'item_name' => 'Name', +// 'location' => 'Loc', +// 'purchase_date' => 'Pur date', +// 'purchase_cost' => 'Pur Cost', +// 'order_number' => 'Order Num', +// 'requestable' => 'Request', +// 'quantity' => 'Quan', +// ]; +// $this->import(new ConsumableImporter($csv), $customFieldMap); +// $this->tester->seeRecord('consumables', [ +// 'name' => 'eget', +// 'purchase_date' => '2011-01-03 00:00:01', +// 'purchase_cost' => 85.91, +// 'order_number' => 'T295T06V', +// 'requestable' => 0, +// 'qty' => 322, +// ]); + +// $this->tester->seeRecord('locations', [ +// 'name' => 'mauris blandit mattis.', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Lycos', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'Triamterene/Hydrochlorothiazide', +// ]); +// } + +// public function testDefaultLicenseImport() +// { +// $this->signIn(); +// $csv = <<<'EOT' +// Full Name,Email,Username,Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes,asset tag +// Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus.,test 1 +// EOT; + +// // Force create an asset to match the checkout +// $testAsset = $this->createValidAsset(['asset_tag' => 'test 1']); +// $this->import(new LicenseImporter($csv)); +// // dd($this->tester->grabRecord('licenses')); + +// // Did we create a user? +// $this->tester->seeRecord('users', [ +// 'first_name' => 'Helen', +// 'last_name' => 'Anderson', +// 'email' => 'cspencer0@privacy.gov.au', +// ]); +// // Grab the user record for use in asserting assigned_to +// $createdUser = $this->tester->grabRecord('users', [ +// 'first_name' => 'Helen', +// 'last_name' => 'Anderson', +// 'email' => 'cspencer0@privacy.gov.au', +// ]); +// $this->tester->seeRecord('licenses', [ +// 'name' => 'Argentum Malachite Athletes Foot Relief', +// 'purchase_date' => '2012-07-13 00:00:01', +// 'seats' => 80, +// 'license_email' => 'cspencer0@gov.uk', +// 'order_number' => '386436062-5', +// 'license_name' => 'Cynthia Spencer', +// 'expiration_date' => '2016-01-27', +// 'maintained' => 0, +// 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', +// 'purchase_cost' => 79.66, +// 'purchase_order' => '53008', +// 'reassignable' => 0, +// 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', +// ]); +// $this->tester->seeRecord('manufacturers', [ +// 'name' => 'Beer, Leannon and Lubowitz', +// ]); + +// $this->tester->seeRecord('suppliers', [ +// 'name' => 'Hegmann, Mohr and Cremin', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Haag, Schmidt and Farrell', +// ]); + +// $this->tester->seeRecord('categories', [ +// 'name' => 'Graphics Software', +// ]); + +// $this->tester->seeNumRecords(80, 'license_seats'); +// $this->tester->seeRecord('license_seats', [ +// 'assigned_to' => $createdUser['id'], +// 'license_id' => \App\Models\License::where('serial', '1aa5b0eb-79c5-40b2-8943-5472a6893c3c')->first()->id, +// 'asset_id' => $testAsset->id, +// ]); +// } + +// public function testDefaultLicenseUpdate() +// { +// $csv = <<<'EOT' +// Name,Email,Username,Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes +// Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. +// EOT; +// $this->import(new LicenseImporter($csv)); +// $this->tester->seeNumRecords(1, 'licenses'); + +// $updatedCSV = <<<'EOT' +// Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes +// Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",05/15/2019,$1865.34,63 ar,18334,A Legend,Legendary@gov.uk,04/27/2016,yes,true,64,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. +// EOT; +// $importer = new LicenseImporter($updatedCSV); +// $importer->setUserId(1) +// ->setUpdating(true) +// ->import(); +// // At this point we should still only have one record. +// $this->tester->seeNumRecords(1, 'licenses'); +// // But instead these. + +// \Log::debug($this->tester->grabRecord('licenses')); +// $this->tester->seeRecord('licenses', [ +// 'name' => 'Argentum Malachite Athletes Foot Relief', +// 'purchase_date' => '2019-05-15 00:00:01', +// 'seats' => 64, +// 'license_email' => 'Legendary@gov.uk', +// 'order_number' => '18334', +// 'license_name' => 'A Legend', +// 'expiration_date' => '2016-04-27', +// 'maintained' => 1, +// 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', +// 'purchase_cost' => 1865.34, +// 'purchase_order' => '63 ar', +// 'reassignable' => 1, +// 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', +// ]); +// // License seats are soft deleted +// $this->tester->seeNumRecords(64, 'license_seats', ['deleted_at' => null]); +// } + +// public function testCustomLicenseImport() +// { +// $csv = <<<'EOT' +// Name,Email,Username,Object name,serial num,manuf,pur date,pur cost,purc order,order num,Licensed To,Licensed Email,expire date,maint,reass,seat,comp,supplier,category,note +// Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Custom Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. +// EOT; + +// $customFieldMap = [ +// 'company' => 'Comp', +// 'expiration_date' => 'expire date', +// 'item_name' => 'Object Name', +// 'license_email' => 'licensed email', +// 'license_name' => 'licensed to', +// 'maintained' => 'maint', +// 'manufacturer' => 'manuf', +// 'notes' => 'note', +// 'order_number' => 'Order Num', +// 'purchase_cost' => 'Pur Cost', +// 'purchase_date' => 'Pur date', +// 'purchase_order' => 'Purc Order', +// 'quantity' => 'Quan', +// 'reassignable' => 'reass', +// 'requestable' => 'Request', +// 'seats' => 'seat', +// 'serial' => 'serial num', +// 'category' => 'category', +// ]; +// $this->import(new LicenseImporter($csv), $customFieldMap); +// $this->tester->seeRecord('licenses', [ +// 'name' => 'Argentum Malachite Athletes Foot Relief', +// 'purchase_date' => '2012-07-13 00:00:01', +// 'seats' => 80, +// 'license_email' => 'cspencer0@gov.uk', +// 'order_number' => '386436062-5', +// 'license_name' => 'Cynthia Spencer', +// 'expiration_date' => '2016-01-27', +// 'maintained' => 0, +// 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', +// 'purchase_cost' => 79.66, +// 'purchase_order' => '53008', +// 'reassignable' => 0, +// 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', +// ]); + +// $this->tester->seeRecord('manufacturers', [ +// 'name' => 'Beer, Leannon and Lubowitz', +// ]); + +// $this->tester->seeRecord('suppliers', [ +// 'name' => 'Hegmann, Mohr and Cremin', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Haag, Schmidt and Farrell', +// ]); + +// $this->tester->seeNumRecords(80, 'license_seats'); +// } + +// public function testDefaultUserImport() +// { +// Notification::fake(); +// $this->signIn(); +// $csv = <<<'EOT' +// First Name,Last Name,email,Username,Location,Phone Number,Job Title,Employee Number,Company,Department,activated +// Blanche,O'Collopy,bocollopy0@livejournal.com,bocollopy0,Hinapalanan,63-(199)661-2186,Clinical Specialist,7080919053,Morar-Ward,Management,1 +// Jessie,Primo,,jprimo1,Korenovsk,7-(885)578-0266,Paralegal,6284292031,Jast-Stiedemann,1 + +// EOT; +// $user_importer = new UserImporter($csv); +// $user_importer->sendWelcome(); +// $this->import($user_importer); + +// $this->tester->seeRecord('users', [ +// 'first_name' => 'Blanche', +// 'last_name' => "O'Collopy", +// 'email' => 'bocollopy0@livejournal.com', +// 'username' => 'bocollopy0', +// 'phone' => '63-(199)661-2186', +// 'jobtitle' => 'Clinical Specialist', +// 'employee_num' => '7080919053', +// ]); + +// $this->tester->seeRecord('companies', [ +// 'name' => 'Morar-Ward', +// ]); + +// $this->tester->seeRecord('departments', [ +// 'name' => 'Management', +// ]); + +// Notification::assertSentTo(User::find(2), \App\Notifications\WelcomeNotification::class); +// Notification::assertNotSentTo(User::find(3), \App\Notifications\WelcomeNotification::class); +// } + +// private function import($importer, $mappings = null) +// { +// if ($mappings) { +// $importer->setFieldMappings($mappings); +// } +// $importer->setUserId(1) +// ->setUpdating(false) +// ->setUsernameFormat('firstname.lastname') +// ->import(); +// } +} diff --git a/tests/unit/LocationTest.php b/tests/Unit/LocationTest.php similarity index 69% rename from tests/unit/LocationTest.php rename to tests/Unit/LocationTest.php index 2bb330cb4..eda9c6a89 100644 --- a/tests/unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -1,10 +1,9 @@ assertFalse($a->isValid()); - $this->assertStringContainsString('The parent id and id must be different', $a->getErrors()); + $this->assertStringContainsString(trans('validation.non_circular', ['attribute' => 'parent id']), $a->getErrors()); } } diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php new file mode 100644 index 000000000..509aee684 --- /dev/null +++ b/tests/Unit/NotificationTest.php @@ -0,0 +1,43 @@ +create(); + $asset = Asset::factory() + ->create( + [ + 'model_id' => AssetModel::factory() + ->create( + [ + 'category_id' => Category::factory()->assetLaptopCategory()->id + ] + )->id, + 'warranty_months' => 24, + 'purchase_date' => Carbon::createFromDate(2017, 1, 1)->hour(0)->minute(0)->second(0) + ]); + + //dd($asset); + Notification::fake(); + $asset->checkOut($user, $asset->id); + Notification::assertSentTo($user, CheckoutAssetNotification::class); + } +} diff --git a/tests/Unit/PermissionsTest.php b/tests/Unit/PermissionsTest.php new file mode 100644 index 000000000..86d40de86 --- /dev/null +++ b/tests/Unit/PermissionsTest.php @@ -0,0 +1,513 @@ +noHardware = [ + // 'assets.view' => false, + // 'assets.create' => false, + // 'assets.edit' => false, + // 'assets.delete' => false, + // ]; + + // $this->noLicenses = [ + // 'licenses.view' => false, + // 'licenses.create' => false, + // 'licenses.edit' => false, + // 'licenses.delete' => false, + // ]; + + // $this->noAccessories = [ + // 'accessories.view' => false, + // 'accessories.create' => false, + // 'accessories.edit' => false, + // 'accessories.delete' => false, + // ]; + + // $this->noConsumables = [ + // 'consumables.view' => false, + // 'consumables.create' => false, + // 'consumables.edit' => false, + // 'consumables.delete' => false, + // ]; + + // $this->noComponents = [ + // 'components.view' => false, + // 'components.create' => false, + // 'components.edit' => false, + // 'components.delete' => false, + // ]; + + // $this->noUsers = [ + // 'users.view' => false, + // 'users.create' => false, + // 'users.edit' => false, + // 'users.delete' => false, + // ]; + // } + + // private $noHardware; + // private $noLicenses; + // private $noAccessories; + // private $noConsumables; + // private $noComponents; + // private $noUsers; + + // // tests + + // /** + // * @test + // */ + // public function a_user_with_no_permissions_sees_nothing() + // { + // $u = \App\Models\User::factory()->create(); + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + // // $permissions = $this->noHardware; + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_asset_permissions_can_view_assets() + // { + // $u = \App\Models\User::factory()->viewAssets()->create(); + // $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'assets.view' => true, + // 'assets.create' => false, + // 'assets.edit' => false, + // 'assets.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_asset_permissions_can_create_assets() + // { + // $u = \App\Models\User::factory()->createAssets()->create(); + // $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'assets.view' => false, + // 'assets.create' => true, + // 'assets.edit' => false, + // 'assets.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_assets_permissions_can_edit_assets() + // { + // $u = \App\Models\User::factory()->editAssets()->create(); + + // $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'assets.view' => false, + // 'assets.create' => false, + // 'assets.edit' => true, + // 'assets.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_assets_permissions_can_delete_assets() + // { + // $u = \App\Models\User::factory()->deleteAssets()->create(); + // $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + // $permissions = array_merge($permissions, [ + // 'assets.view' => false, + // 'assets.create' => false, + // 'assets.edit' => false, + // 'assets.delete' => true, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_licenses_permissions_can_view_licenses() + // { + // $u = \App\Models\User::factory()->viewLicenses()->create(); + // $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'licenses.view' => true, + // 'licenses.create' => false, + // 'licenses.edit' => false, + // 'licenses.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_licenses_permissions_can_create_licenses() + // { + // $u = \App\Models\User::factory()->createLicenses()->create(); + // $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'licenses.view' => false, + // 'licenses.create' => true, + // 'licenses.edit' => false, + // 'licenses.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_licenses_permissions_can_edit_licenses() + // { + // $u = \App\Models\User::factory()->editLicenses()->create(); + // $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'licenses.view' => false, + // 'licenses.create' => false, + // 'licenses.edit' => true, + // 'licenses.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_licenses_permissions_can_delete_licenses() + // { + // $u = \App\Models\User::factory()->deleteLicenses()->create(); + // $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'licenses.view' => false, + // 'licenses.create' => false, + // 'licenses.edit' => false, + // 'licenses.delete' => true, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_accessories_permissions_can_view_accessories() + // { + // $u = \App\Models\User::factory()->viewAccessories()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'accessories.view' => true, + // 'accessories.create' => false, + // 'accessories.edit' => false, + // 'accessories.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_accessories_permissions_can_create_accessories() + // { + // $u = \App\Models\User::factory()->createAccessories()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'accessories.view' => false, + // 'accessories.create' => true, + // 'accessories.edit' => false, + // 'accessories.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_accessories_permissions_can_edit_accessories() + // { + // $u = \App\Models\User::factory()->editAccessories()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'accessories.view' => false, + // 'accessories.create' => false, + // 'accessories.edit' => true, + // 'accessories.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_accessories_permissions_can_delete_accessories() + // { + // $u = \App\Models\User::factory()->deleteAccessories()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'accessories.view' => false, + // 'accessories.create' => false, + // 'accessories.edit' => false, + // 'accessories.delete' => true, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_consumables_permissions_can_view_consumables() + // { + // $u = \App\Models\User::factory()->viewConsumables()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'consumables.view' => true, + // 'consumables.create' => false, + // 'consumables.edit' => false, + // 'consumables.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_consumables_permissions_can_create_consumables() + // { + // $u = \App\Models\User::factory()->createConsumables()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'consumables.view' => false, + // 'consumables.create' => true, + // 'consumables.edit' => false, + // 'consumables.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_consumables_permissions_can_edit_consumables() + // { + // $u = \App\Models\User::factory()->editConsumables()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'consumables.view' => false, + // 'consumables.create' => false, + // 'consumables.edit' => true, + // 'consumables.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_consumables_permissions_can_delete_consumables() + // { + // $u = \App\Models\User::factory()->deleteConsumables()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'consumables.view' => false, + // 'consumables.create' => false, + // 'consumables.edit' => false, + // 'consumables.delete' => true, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_users_permissions_can_view_users() + // { + // $u = \App\Models\User::factory()->viewUsers()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; + + // $permissions = array_merge($permissions, [ + // 'users.view' => true, + // 'users.create' => false, + // 'users.edit' => false, + // 'users.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_users_permissions_can_create_users() + // { + // $u = \App\Models\User::factory()->createUsers()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; + + // $permissions = array_merge($permissions, [ + // 'users.view' => false, + // 'users.create' => true, + // 'users.edit' => false, + // 'users.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_users_permissions_can_edit_users() + // { + // $u = \App\Models\User::factory()->editUsers()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; + + // $permissions = array_merge($permissions, [ + // 'users.view' => false, + // 'users.create' => false, + // 'users.edit' => true, + // 'users.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_users_permissions_can_delete_users() + // { + // $u = \App\Models\User::factory()->deleteUsers()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; + + // $permissions = array_merge($permissions, [ + // 'users.view' => false, + // 'users.create' => false, + // 'users.edit' => false, + // 'users.delete' => true, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_view_components_permissions_can_view_components() + // { + // $u = \App\Models\User::factory()->viewComponents()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'components.view' => true, + // 'components.create' => false, + // 'components.edit' => false, + // 'components.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_create_components_permissions_can_create_components() + // { + // $u = \App\Models\User::factory()->createComponents()->create(); + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'components.view' => false, + // 'components.create' => true, + // 'components.edit' => false, + // 'components.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_edit_components_permissions_can_edit_components() + // { + // $u = \App\Models\User::factory()->editComponents()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'components.view' => false, + // 'components.create' => false, + // 'components.edit' => true, + // 'components.delete' => false, + // ]); + // $this->hitRoutes($permissions, $u); + // } + + // /** + // * @test + // */ + // public function a_user_with_delete_components_permissions_can_delete_components() + // { + // $u = \App\Models\User::factory()->deleteComponents()->create(); + + // $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; + + // $permissions = array_merge($permissions, [ + // 'components.view' => false, + // 'components.create' => false, + // 'components.edit' => false, + // 'components.delete' => true, + // ]); + // // dd($u); + // $this->hitRoutes($permissions, $u); + // } + + // private function hitRoutes(array $routes, User $user) + // { + // foreach ($routes as $route => $expectation) { + // $this->assertEquals($user->hasAccess($route), $expectation); + // } + // } +} diff --git a/tests/unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php similarity index 98% rename from tests/unit/SnipeModelTest.php rename to tests/Unit/SnipeModelTest.php index 0cf013e68..8884ecf6d 100644 --- a/tests/unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -1,6 +1,8 @@ rtd()->create(); + $this->assertModelExists($statuslabel); + } + + public function testPendingStatuslabelAdd() + { + $statuslabel = Statuslabel::factory()->pending()->create(); + $this->assertModelExists($statuslabel); + } + + public function testArchivedStatuslabelAdd() + { + $statuslabel = Statuslabel::factory()->archived()->create(); + $this->assertModelExists($statuslabel); + } + + public function testOutForRepairStatuslabelAdd() + { + $statuslabel = Statuslabel::factory()->outForRepair()->create(); + $this->assertModelExists($statuslabel); + } + + public function testBrokenStatuslabelAdd() + { + $statuslabel = Statuslabel::factory()->broken()->create(); + $this->assertModelExists($statuslabel); + } + + public function testLostStatuslabelAdd() + { + $statuslabel = Statuslabel::factory()->lost()->create(); + $this->assertModelExists($statuslabel); + } +} diff --git a/tests/unit/UserTest.php b/tests/Unit/UserTest.php similarity index 83% rename from tests/unit/UserTest.php rename to tests/Unit/UserTest.php index 010bd9c78..d5891a832 100644 --- a/tests/unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -1,10 +1,11 @@ make(); - // $values = [ - // 'first_name' => $user->first_name, - // 'last_name' => $user->last_name, - // 'email' => $user->email, - // 'username' => $user->username, - // 'password' => $user->password, - // ]; - - // User::create($values); - // $this->tester->seeRecord('users', $values); - // } - public function testFirstNameSplit() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_firstname = 'Natalia'; $expected_lastname = "Allanovna Romanova-O'Shostakova"; - $user = User::generateFormattedNameFromFullName('firstname', $fullname); + $user = User::generateFormattedNameFromFullName($fullname, 'firstname'); $this->assertEquals($expected_firstname, $user['first_name']); $this->assertEquals($expected_lastname, $user['last_name']); } @@ -73,8 +59,8 @@ class UserTest extends BaseTest public function testFirstInitialUnderscoreLastName() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; - $expected_username = 'n_allanovna-romanova-oshostakova'; - $user = User::generateFormattedNameFromFullName($fullname, 'firstname_lastname'); + $expected_username = 'nallanovna-romanova-oshostakova'; + $user = User::generateFormattedNameFromFullName($fullname, 'firstinitial_lastname'); $this->assertEquals($expected_username, $user['username']); } @@ -82,7 +68,7 @@ class UserTest extends BaseTest { $fullname = 'Natalia'; $expected_username = 'natalia'; - $user = User::generateFormattedNameFromFullName('firstname_lastname', $fullname); + $user = User::generateFormattedNameFromFullName($fullname, 'firstname_lastname',); $this->assertEquals($expected_username, $user['username']); } diff --git a/tests/unit/_bootstrap.php b/tests/Unit/_bootstrap.php similarity index 100% rename from tests/unit/_bootstrap.php rename to tests/Unit/_bootstrap.php diff --git a/tests/unit/AccessoryTest.php b/tests/unit/AccessoryTest.php deleted file mode 100644 index a3c7e7337..000000000 --- a/tests/unit/AccessoryTest.php +++ /dev/null @@ -1,100 +0,0 @@ -assertFalse($a->isValid()); - $fields = [ - 'name' => 'name', - 'qty' => 'qty', - 'category_id' => 'category id', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testFailsMinValidation() - { - // An Accessory name has a min length of 3 - // An Accessory has a min qty of 1 - // An Accessory has a min amount of 0 - $a = Accessory::factory()->make([ - 'name' => 'a', - 'qty' => 0, - 'min_amt' => -1, - ]); - $fields = [ - 'name' => 'name', - 'qty' => 'qty', - 'min_amt' => 'min amt', - ]; - $this->assertFalse($a->isValid()); - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertStringContainsString("The ${fieldTitle} must be at least", $errors->get($field)[0]); - } - } - - public function testCategoryIdMustExist() - { - $category = $this->createValidCategory('accessory-keyboard-category', ['category_type' => 'accessory']); - $accessory = Accessory::factory()->appleBtKeyboard()->make(['category_id' => $category->id]); - $this->createValidManufacturer('apple'); - - $accessory->save(); - $this->assertTrue($accessory->isValid()); - $newId = $category->id + 1; - $accessory = Accessory::factory()->appleBtKeyboard()->make(['category_id' => $newId]); - $accessory->save(); - - $this->assertFalse($accessory->isValid()); - $this->assertStringContainsString('The selected category id is invalid.', $accessory->getErrors()->get('category_id')[0]); - } - - public function testAnAccessoryBelongsToACompany() - { - $accessory = Accessory::factory() - ->create(['company_id' => \App\Models\Company::factory()->create()->id]); - $this->assertInstanceOf(App\Models\Company::class, $accessory->company); - } - - public function testAnAccessoryHasALocation() - { - $accessory = Accessory::factory() - ->create(['location_id' => \App\Models\Location::factory()->create()->id]); - $this->assertInstanceOf(App\Models\Location::class, $accessory->location); - } - - public function testAnAccessoryBelongsToACategory() - { - $accessory = Accessory::factory()->appleBtKeyboard() - ->create(['category_id' => Category::factory()->accessoryKeyboardCategory()->create(['category_type' => 'accessory'])->id]); - $this->assertInstanceOf(App\Models\Category::class, $accessory->category); - $this->assertEquals('accessory', $accessory->category->category_type); - } - - public function testAnAccessoryHasAManufacturer() - { - $this->createValidManufacturer('apple'); - $this->createValidCategory('accessory-keyboard-category'); - $accessory = Accessory::factory()->appleBtKeyboard()->create(['category_id' => 1]); - $this->assertInstanceOf(App\Models\Manufacturer::class, $accessory->manufacturer); - } -} diff --git a/tests/unit/AssetModelTest.php b/tests/unit/AssetModelTest.php deleted file mode 100644 index 8a5501dce..000000000 --- a/tests/unit/AssetModelTest.php +++ /dev/null @@ -1,68 +0,0 @@ -assertFalse($a->isValid()); - $fields = [ - 'name' => 'name', - 'manufacturer_id' => 'manufacturer id', - 'category_id' => 'category id', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testAnAssetModelZerosOutBlankEols() - { - $am = new AssetModel; - $am->eol = ''; - $this->assertTrue($am->eol === 0); - $am->eol = '4'; - $this->assertTrue($am->eol == 4); - } - - public function testAnAssetModelContainsAssets() - { - $assetModel = $this->createValidAssetModel(); - $this->createValidAsset([ - 'model_id' => $assetModel->id, - ]); - $this->assertEquals(1, $assetModel->assets()->count()); - } - - public function testAnAssetModelHasACategory() - { - $assetmodel = $this->createValidAssetModel(); - $this->assertInstanceOf(App\Models\Category::class, $assetmodel->category); - } - - public function testAnAssetModelHasADepreciation() - { - $assetmodel = $this->createValidAssetModel(); - $this->assertInstanceOf(App\Models\Depreciation::class, $assetmodel->depreciation); - } - - public function testAnAssetModelHasAManufacturer() - { - $assetmodel = $this->createValidAssetModel(); - $this->assertInstanceOf(App\Models\Manufacturer::class, $assetmodel->manufacturer); - } -} diff --git a/tests/unit/AssetTest.php b/tests/unit/AssetTest.php deleted file mode 100644 index 84b83f1f2..000000000 --- a/tests/unit/AssetTest.php +++ /dev/null @@ -1,323 +0,0 @@ -assertFalse($a->isValid()); - - $fields = [ - 'model_id' => 'model id', - 'status_id' => 'status id', - 'asset_tag' => 'asset tag', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testAutoIncrementMixed() - { - $expected = '123411'; - $next = Asset::nextAutoIncrement( - collect([ - ['asset_tag' => '0012345'], - ['asset_tag' => 'WTF00134'], - ['asset_tag' => 'WTF-745'], - ['asset_tag' => '0012346'], - ['asset_tag' => '00123410'], - ['asset_tag' => 'U8T7597h77'], - ]) - ); - - \Log::debug(print_r($next)); - $this->assertEquals($expected, $next); - } - - public function testAutoIncrementMixedFullTagNumber() - { - $expected = '123411'; - $next = Asset::nextAutoIncrement( - [ - ['asset_tag' => '0012345'], - ['asset_tag' => 'WTF00134'], - ['asset_tag' => 'WTF-745'], - ['asset_tag' => '0012346'], - ['asset_tag' => '00123410'], - ['asset_tag' => 'U8T7597h77'], - ] - ); - $this->assertEquals($expected, $next); - } - - /** - * @test - */ - public function testWarrantyExpiresAttribute() - { - $asset = Asset::factory()->laptopMbp()->create([ - 'model_id' => $this->createValidAssetModel()->id, - 'supplier_id' => $this->createvalidSupplier()->id, - 'rtd_location_id' => $this->createValidLocation()->id, - ]); - - $asset->purchase_date = Carbon::createFromDate(2017, 1, 1)->hour(0)->minute(0)->second(0); - $asset->warranty_months = 24; - $asset->save(); - - $saved_asset = Asset::find($asset->id); - - $this->tester->assertInstanceOf(\DateTime::class, $saved_asset->purchase_date); - $this->tester->assertEquals( - Carbon::createFromDate(2017, 1, 1)->format('Y-m-d'), - $saved_asset->purchase_date->format('Y-m-d') - ); - $this->tester->assertEquals( - Carbon::createFromDate(2017, 1, 1)->setTime(0, 0, 0), - $saved_asset->purchase_date - ); - $this->tester->assertEquals(24, $saved_asset->warranty_months); - $this->tester->assertInstanceOf(\DateTime::class, $saved_asset->warranty_expires); - $this->tester->assertEquals( - Carbon::createFromDate(2019, 1, 1)->format('Y-m-d'), - $saved_asset->warranty_expires->format('Y-m-d') - ); - $this->tester->assertEquals( - Carbon::createFromDate(2019, 1, 1)->setTime(0, 0, 0), - $saved_asset->warranty_expires - ); - } - - public function testModelIdMustExist() - { - $model = $this->createValidAssetModel(); - $asset = Asset::factory()->make([ - 'model_id' => $model->id, - 'supplier_id' => $this->createValidSupplier()->id, - 'rtd_location_id' => $this->createValidLocation()->id, - ]); - $asset->save(); - $this->assertTrue($asset->isValid()); - $newId = $model->id + 1; - $asset = Asset::factory()->make(['model_id' => $newId]); - $asset->save(); - - $this->assertFalse($asset->isValid()); - } - - public function testAnAssetHasRelationships() - { - $asset = Asset::factory()->laptopMbp() - ->create([ - 'model_id' => $this->createValidAssetModel()->id, - 'company_id' => $this->createValidCompany()->id, - 'supplier_id' => $this->createValidSupplier()->id, - ]); - $this->assertInstanceOf(AssetModel::class, $asset->model); - $this->assertInstanceOf(Company::class, $asset->company); - $this->assertInstanceOf(App\Models\Depreciation::class, $asset->depreciation); - $this->assertInstanceOf(App\Models\Statuslabel::class, $asset->assetstatus); - $this->assertInstanceOf(App\Models\Supplier::class, $asset->supplier); - } - - public function testAnAssetCanBeAvailableForCheckout() - { - // Logic: If the asset is not assigned to anyone, - // and the statuslabel type is "deployable" - // and the asset is not deleted - // Then it is available for checkout - - // An asset assigned to someone should not be available for checkout. - $assetAssigned = Asset::factory()->laptopMbp()->assignedToUser() - ->create(['model_id' => $this->createValidAssetModel()]); - $this->assertFalse($assetAssigned->availableForCheckout()); - - // An asset with a non deployable statuslabel should not be available for checkout. - $assetUndeployable = Asset::factory()->create([ - 'status_id' => $this->createValidStatuslabel('archived')->id, - 'model_id' => $this->createValidAssetModel(), - ]); - - $this->assertFalse($assetUndeployable->availableForCheckout()); - - // An asset that has been deleted is not avaiable for checkout. - $assetDeleted = Asset::factory()->deleted()->create([ - 'model_id' => $this->createValidAssetModel(), - ]); - $this->assertFalse($assetDeleted->availableForCheckout()); - - // A ready to deploy asset that isn't assigned to anyone is available for checkout - $asset = Asset::factory()->create([ - 'status_id' => $this->createValidStatuslabel('rtd')->id, - 'model_id' => $this->createValidAssetModel(), - ]); - $this->assertTrue($asset->availableForCheckout()); - } - - public function testAnAssetCanHaveComponents() - { - $asset = $this->createValidAsset(); - - $components = \App\Models\Component::factory()->count(5)->ramCrucial4()->create([ - 'category_id' => $this->createValidCategory('component-hdd-category')->id, - ]); - - $components->each(function ($component) use ($asset) { - $component->assets()->attach($component, [ - 'asset_id'=>$asset->id, - ]); - }); - $this->assertInstanceOf(App\Models\Component::class, $asset->components()->first()); - $this->assertCount(5, $asset->components); - } - - public function testAnAssetCanHaveUploads() - { - $asset = $this->createValidAsset([ - 'supplier_id' => $this->createValidSupplier()->id, - ]); - $this->assertCount(0, $asset->uploads); - \App\Models\Actionlog::factory()->count('asset-upload')->create(['item_id' => $asset->id]); - $this->assertCount(1, $asset->fresh()->uploads); - } - - // Helper Method for checking in assets.... We should extract this to the model or a trait. - - private function checkin($asset, $target) - { - $asset->expected_checkin = null; - $asset->last_checkout = null; - $asset->assigned_to = null; - $asset->assigned_type = null; - $asset->location_id = $asset->rtd_location_id; - $asset->assignedTo()->disassociate($asset); - $asset->accepted = null; - $asset->save(); - $asset->logCheckin($target, 'Test Checkin'); - } - - public function testAnAssetCanBeCheckedOut() - { - // This tests Asset::checkOut(), Asset::assignedTo(), Asset::assignedAssets(), Asset::assetLoc(), Asset::assignedType(), defaultLoc() - $asset = $this->createValidAsset(); - $adminUser = $this->signIn(); - - $target = \App\Models\User::factory()->create([ - 'location_id' => \App\Models\Location::factory()->create(), - ]); - // An Asset Can be checked out to a user, and this should be logged. - $asset->checkOut($target, $adminUser); - $asset->save(); - $this->assertInstanceOf(App\Models\User::class, $asset->assignedTo); - - $this->assertEquals($asset->location->id, $target->userLoc->id); - $this->assertEquals('user', $asset->assignedType()); - $this->assertEquals($asset->defaultLoc->id, $asset->rtd_location_id); - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkout', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - - $this->tester->seeRecord('assets', [ - 'id' => $asset->id, - 'assigned_to' => $target->id, - 'assigned_type' => User::class, - ]); - - $this->checkin($asset, $target); - $this->assertNull($asset->fresh()->assignedTo); - - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkin from', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - - $this->tester->seeRecord('assets', [ - 'id' => $asset->id, - 'assigned_to' => null, - 'assigned_type' => null, - ]); - - // An Asset Can be checked out to a asset, and this should be logged. - $target = $this->createValidAsset(); - - $asset->checkOut($target, $adminUser); - $asset->save(); - $this->assertInstanceOf(App\Models\Asset::class, $asset->fresh()->assignedTo); - $this->assertEquals($asset->fresh()->location->id, $target->fresh()->location->id); - $this->assertEquals('asset', $asset->assignedType()); - $this->assertEquals($asset->defaultLoc->id, $asset->rtd_location_id); - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkout', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - - $this->assertCount(1, $target->assignedAssets); - $this->checkin($asset, $target); - $this->assertNull($asset->fresh()->assignedTo); - - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkin from', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - - // An Asset cannot be checked out to itself. - $target = $this->createValidAsset(); - $this->expectException(CheckoutNotAllowed::class); - $target->checkOut($target, $adminUser); - - // An Asset Can be checked out to a location, and this should be logged. - $target = $this->createValidLocation(); - - $asset->checkOut($target, $adminUser); - $asset->save(); - $this->assertInstanceOf(App\Models\Location::class, $asset->fresh()->assignedTo); - - $this->assertEquals($asset->fresh()->location->id, $target->fresh()->id); - $this->assertEquals('location', $asset->assignedType()); - $this->assertEquals($asset->defaultLoc->id, $asset->rtd_location_id); - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkout', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - $this->checkin($asset, $target); - $this->assertNull($asset->fresh()->assignedTo); - - $this->tester->seeRecord('action_logs', [ - 'action_type' => 'checkin from', - 'target_type' => get_class($target), - 'target_id' => $target->id, - ]); - } - - public function testAnAssetHasMaintenances() - { - $asset = $this->createValidAsset(); - \App\Models\AssetMaintenance::factory()->create(['asset_id' => $asset->id]); - $this->assertCount(1, $asset->assetmaintenances); - } -} diff --git a/tests/unit/CategoryTest.php b/tests/unit/CategoryTest.php deleted file mode 100644 index 88ca9c3d2..000000000 --- a/tests/unit/CategoryTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertFalse($a->isValid()); - - $fields = [ - 'name' => 'name', - 'category_type' => 'category type', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testACategoryCanHaveAssets() - { - $this->createValidAssetModel(); //This will seed various things to make the following work better. - $category = $this->createValidCategory('asset-desktop-category'); - $models = \App\Models\AssetModel::factory()->count(5)->mbp13Model()->create(['category_id' => $category->id]); - - $this->assertEquals(5, $category->models->count()); - $this->assertCount(5, $category->models); - - $models->each(function ($model) { - // This is intentionally run twice to generate the ten imagined assets, done this way to keep it in sync with createValidAsset rather than using the factory directly. - $this->createValidAsset(['model_id' => $model->id]); - $this->createValidAsset(['model_id' => $model->id]); - }); - $this->assertEquals(10, $category->itemCount()); - } - - public function testACategoryCanHaveAccessories() - { - $category = $this->createValidCategory('accessory-keyboard-category'); - \App\Models\Accessory::factory()->count(5)->appleBtKeyboard()->create(['category_id' => $category->id]); - - $this->assertCount(5, $category->accessories); - $this->assertEquals(5, $category->itemCount()); - } - - public function testACategoryCanHaveConsumables() - { - $category = $this->createValidCategory('consumable-paper-category'); - \App\Models\Consumable::factory()->count(5)->cardstock()->create(['category_id' => $category->id]); - $this->assertCount(5, $category->consumables); - $this->assertEquals(5, $category->itemCount()); - } - - public function testACategoryCanHaveComponents() - { - $category = $this->createValidCategory('component-ram-category'); - \App\Models\Component::factory()->count(5)->ramCrucial4()->create(['category_id' => $category->id]); - $this->assertCount(5, $category->components); - $this->assertEquals(5, $category->itemCount()); - } -} diff --git a/tests/unit/CompanyTest.php b/tests/unit/CompanyTest.php deleted file mode 100644 index 7fe40ddb2..000000000 --- a/tests/unit/CompanyTest.php +++ /dev/null @@ -1,86 +0,0 @@ -assertFalse($a->isValid()); - - $fields = [ - 'name' => 'name', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testACompanyCanHaveUsers() - { - $company = $this->createValidCompany(); - $user = $this->createValidUser(['company_id'=>$company->id]); - $this->assertCount(1, $company->users); - } - - public function testACompanyCanHaveAssets() - { - $company = $this->createValidCompany(); - $this->createValidAsset(['company_id' => $company->id]); - $this->assertCount(1, $company->assets); - } - - public function testACompanyCanHaveLicenses() - { - $company = $this->createValidCompany(); - \App\Models\License::factory()->count(1)->acrobat()->create([ - 'company_id'=>$company->id, - 'manufacturer_id' => \App\Models\Manufacturer::factory()->adobe()->create()->id, - 'category_id' => \App\Models\Category::factory()->licenseOfficeCategory()->create()->id, - ]); - $this->assertCount(1, $company->licenses); - } - - public function testACompanyCanHaveAccessories() - { - $company = $this->createValidCompany(); - $a = \App\Models\Accessory::factory()->appleBtKeyboard()->create([ - 'category_id' => \App\Models\Category::factory()->accessoryKeyboardCategory()->create()->id, - 'company_id' => $company->id, - ]); - - $this->assertCount(1, $company->accessories); - } - - public function testACompanyCanHaveConsumables() - { - $company = $this->createValidCompany(); - \App\Models\Consumable::factory()->count(1)->cardstock()->create([ - 'company_id' => $company->id, - 'category_id' => \App\Models\Category::factory()->consumablePaperCategory()->create()->id, - ]); - $this->assertCount(1, $company->consumables); - } - - public function testACompanyCanHaveComponents() - { - $company = $this->createValidCompany(); - \App\Models\Component::factory()->count(1)->ramCrucial4()->create([ - 'company_id'=>$company->id, - 'category_id' => \App\Models\Category::factory()->componentRamCategory()->create()->id, - ]); - $this->assertCount(1, $company->components); - } -} diff --git a/tests/unit/ComponentTest.php b/tests/unit/ComponentTest.php deleted file mode 100644 index 985c2c8f7..000000000 --- a/tests/unit/ComponentTest.php +++ /dev/null @@ -1,99 +0,0 @@ -assertFalse($a->isValid()); - $fields = [ - 'name' => 'name', - 'qty' => 'qty', - 'category_id' => 'category id', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testFailsMinValidation() - { - // An Component name has a min length of 3 - // An Component has a min qty of 1 - // An Component has a min amount of 0 - $a = Component::factory()->make([ - 'name' => 'a', - 'qty' => 0, - 'min_amt' => -1, - ]); - $fields = [ - 'name' => 'name', - 'qty' => 'qty', - 'min_amt' => 'min amt', - ]; - $this->assertFalse($a->isValid()); - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertStringContainsString("The ${fieldTitle} must be at least", $errors->get($field)[0]); - } - } - - public function testCategoryIdMustExist() - { - $category = $this->createValidCategory('component-hdd-category', - ['category_type' => 'component']); - $component = Component::factory()->ssdCrucial240() - ->make(['category_id' => $category->id]); - $this->createValidManufacturer('apple'); - - $component->save(); - $this->assertTrue($component->isValid()); - $newId = $category->id + 1; - $component = Component::factory()->ssdCrucial240()->make(['category_id' => $newId]); - $component->save(); - - $this->assertFalse($component->isValid()); - $this->assertStringContainsString('The selected category id is invalid.', $component->getErrors()->get('category_id')[0]); - } - - public function testAnComponentBelongsToACompany() - { - $component = Component::factory() - ->create(['company_id' => Company::factory()->create()->id]); - $this->assertInstanceOf(Company::class, $component->company); - } - - public function testAnComponentHasALocation() - { - $component = Component::factory() - ->create(['location_id' => Location::factory()->create()->id]); - $this->assertInstanceOf(Location::class, $component->location); - } - - public function testAnComponentBelongsToACategory() - { - $component = Component::factory()->ssdCrucial240() - ->create([ - 'category_id' => Category::factory()->componentHddCategory() - ->create(['category_type' => 'component'])->id, - ]); - $this->assertInstanceOf(Category::class, $component->category); - $this->assertEquals('component', $component->category->category_type); - } -} diff --git a/tests/unit/ConsumableTest.php b/tests/unit/ConsumableTest.php deleted file mode 100644 index 276699e6f..000000000 --- a/tests/unit/ConsumableTest.php +++ /dev/null @@ -1,49 +0,0 @@ -assertFalse($a->isValid()); - - $fields = [ - 'name' => 'name', - 'qty' => 'qty', - 'category_id' => 'category id', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testAConsumableHasRelationships() - { - $consumable = Consumable::factory()->cardstock()->create([ - 'category_id' => $this->createValidCategory('consumable-paper-category')->id, - 'manufacturer_id' => $this->createValidManufacturer('apple')->id, - 'company_id' => $this->createValidCompany()->id, - 'location_id' => $this->createValidLocation()->id, - 'user_id' => $this->signIn()->id, - ]); - - $this->assertInstanceOf(App\Models\User::class, $consumable->admin); - $this->assertInstanceOf(App\Models\Company::class, $consumable->company); - $this->assertInstanceOf(App\Models\Manufacturer::class, $consumable->manufacturer); - $this->assertInstanceOf(App\Models\Location::class, $consumable->location); - $this->assertInstanceOf(App\Models\Category::class, $consumable->category); - } -} diff --git a/tests/unit/DepartmentTest.php b/tests/unit/DepartmentTest.php deleted file mode 100644 index ad20285db..000000000 --- a/tests/unit/DepartmentTest.php +++ /dev/null @@ -1,29 +0,0 @@ -make(); - // $values = [ - // 'name' => $department->name, - // 'user_id' => $department->user_id, - // 'manager_id' => $department->manager_id, - // ]; - - // Department::create($values); - // $this->tester->seeRecord('departments', $values); - // } -} diff --git a/tests/unit/DepreciationTest.php b/tests/unit/DepreciationTest.php deleted file mode 100644 index 69dccb5ce..000000000 --- a/tests/unit/DepreciationTest.php +++ /dev/null @@ -1,50 +0,0 @@ -assertFalse($a->isValid()); - - $fields = [ - 'name' => 'name', - 'months' => 'months', - ]; - $errors = $a->getErrors(); - foreach ($fields as $field => $fieldTitle) { - $this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required."); - } - } - - public function testADepreciationHasModels() - { - $this->createValidAssetModel(); - $depreciation = $this->createValidDepreciation('computer', ['name' => 'New Depreciation']); - $models = \App\Models\AssetModel::factory()->count(5)->mbp13Model()->create(['depreciation_id'=>$depreciation->id]); - $this->assertEquals(5, $depreciation->models->count()); - } - - public function testADepreciationHasLicenses() - { - $category = $this->createValidCategory('license-graphics-category'); - $depreciation = $this->createValidDepreciation('computer', ['name' => 'New Depreciation']); - $licenses = \App\Models\License::factory()->count(5)->photoshop()->create([ - 'depreciation_id'=>$depreciation->id, - 'category_id' => $category->id, - ]); - - $this->assertEquals(5, $depreciation->licenses()->count()); - } -} diff --git a/tests/unit/ImporterTest.php b/tests/unit/ImporterTest.php deleted file mode 100644 index b0cb05f6e..000000000 --- a/tests/unit/ImporterTest.php +++ /dev/null @@ -1,746 +0,0 @@ -signIn(); - $csv = <<<'EOT' -Full Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,Weight -Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,35 -EOT; - - $this->initializeCustomFields(); - $this->import(new AssetImporter($csv)); - - $this->tester->seeRecord('users', [ - 'first_name' => 'Bonnie', - 'last_name' => 'Nelson', - 'email' => 'bnelson0@cdbaby.com', - ]); - $this->tester->seeRecord('categories', [ - 'name' => 'quam', - ]); - - $this->tester->seeRecord('models', [ - 'name' => 'massa id', - 'model_number' => 6377018600094472, - ]); - - $this->tester->seeRecord('manufacturers', [ - 'name' => 'Linkbridge', - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'Daping', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Alpha', - ]); - - $this->tester->seeRecord('status_labels', [ - 'name' => 'Undeployable', - ]); - - $this->tester->seeRecord('suppliers', [ - 'name' => 'Blogspan', - ]); - - $this->tester->seeRecord('assets', [ - 'name' => 'eget nunc donec quis', - 'serial' => '27aa8378-b0f4-4289-84a4-405da95c6147', - 'asset_tag' => '970882174-8', - 'notes' => 'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.', - 'purchase_date' => '2016-04-05 00:00:01', - 'purchase_cost' => 133289.59, 'warranty_months' => 14, - '_snipeit_weight_2' => 35, - ]); - } - - public function testImportCheckoutToLocation() - { - $this->signIn(); - - // Testing in order: - // * Asset to user, no checkout type defined (default to user). - // * Asset to user, explicit user checkout type (Checkout to user) - // * Asset to location, location does not exist to begin with - // * Asset to preexisting location. - $csv = <<<'EOT' -Full Name,Email,Username,Checkout Location,Checkout Type,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,Weight -Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,,,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,35 -Mildred Gibson,mgibson2@wiley.com,mgibson2,,user,morbi quis tortor id,nunc nisl duis,convallis tortor risus,Lajo,374622546776765,2837ab20-8f0d-4935-8a52-226392f2b1b0,710141467-2,Shekou,In congue. Etiam justo. Etiam pretium iaculis justo.,2015-08-09,233.57,Konklab,Lost,,, -,,,Planet Earth,location,dictumst maecenas ut,sem praesent,accumsan felis,Layo,30052522651756,4751495c-cee0-4961-b788-94a545b5643e,998233705-X,Dante Delgado,,2016-04-16,261.79,,Archived,15,Ntag, -,,,Daping,location,viverra diam vitae,semper sapien,dapibus dolor vel,Flashset,3559785746335392,e287bb64-ff4f-434c-88ab-210ad433c77b,927820758-6,Achiaman,,2016-03-05,675.3,,Archived,22,Meevee, -EOT; - - $this->import(new AssetImporter($csv)); - - $user = User::where('username', 'bnelson0')->firstOrFail(); - - $this->tester->seeRecord('assets', [ - 'asset_tag' => '970882174-8', - 'assigned_type' => User::class, - 'assigned_to' => $user->id, - ]); - - $user = User::where('username', 'mgibson2')->firstOrFail(); - $this->tester->seeRecord('assets', [ - 'asset_tag' => '710141467-2', - 'assigned_type' => User::class, - 'assigned_to' => $user->id, - ]); - - $location = Location::where('name', 'Planet Earth')->firstOrFail(); - $this->tester->seeRecord('assets', [ - 'asset_tag' => '998233705-X', - 'assigned_type' => Location::class, - 'assigned_to' => $location->id, - ]); - - $location = Location::where('name', 'Daping')->firstOrFail(); - $this->tester->seeRecord('assets', [ - 'asset_tag' => '927820758-6', - 'assigned_type' => Location::class, - 'assigned_to' => $location->id, - ]); - } - - public function testUpdateAssetIncludingCustomFields() - { - $this->signIn(); - $csv = <<<'EOT' -Name,Email,Username,item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier,weight -Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan,95 -EOT; - - $this->initializeCustomFields(); - $this->import(new AssetImporter($csv)); - - $updatedCSV = <<<'EOT' -item Name,Category,Model name,Manufacturer,Model Number,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier -A new name,some other category,Another Model,Linkbridge 32,356,67433477,970882174-8,New Location,I have no notes,2018-04-05,25.59,Another Company,Ready To Go,18,Not Creative -EOT; - $importer = new AssetImporter($updatedCSV); - $importer->setUserId(1) - ->setUpdating(true) - ->setUsernameFormat('firstname.lastname') - ->import(); - - $this->tester->seeRecord('categories', [ - 'name' => 'some other category', - ]); - - $this->tester->seeRecord('models', [ - 'name' => 'Another Model', - 'model_number' => 356, - ]); - - $this->tester->seeRecord('manufacturers', [ - 'name' => 'Linkbridge 32', - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'New Location', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Another Company', - ]); - - $this->tester->seeRecord('status_labels', [ - 'name' => 'Ready To Go', - ]); - - $this->tester->seeRecord('suppliers', [ - 'name' => 'Not Creative', - ]); - - $this->tester->seeRecord('assets', [ - 'name' => 'A new name', - 'serial' => '67433477', - 'asset_tag' => '970882174-8', - 'notes' => 'I have no notes', - 'purchase_date' => '2018-04-05 00:00:01', - 'purchase_cost' => 25.59, - 'warranty_months' => 18, - '_snipeit_weight_2' => 95, - ]); - } - - public function testAssetModelNumber4359() - { - // As per bug #4359 - // 1) Create model with blank model # and custom field. - // 2 ) Update custom fields with a csv not including model # - // 3 ) Not updated. NULL vs. empty issue. - $this->signIn(); - $csv = <<<'EOT' -Name,Email,Username,item Name,Category,Model name,Manufacturer,Serial,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier -Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan -EOT; - - // Need to do this manually... - $customField = \App\Models\CustomField::factory()->create(['name' => 'Weight']); - $customFieldSet = \App\Models\CustomFieldset::factory()->create(['name' => 'Default']); - $customFieldSet->fields()->attach($customField, [ - 'required' => false, - 'order' => 'asc', ]); - - \App\Models\Category::factory()->assetLaptopCategory()->create([ - 'name' => 'quam', - ]); - - \App\Models\Manufacturer::factory()->apple()->create([ - 'name' => 'Linkbridge', - ]); - - $am = \App\Models\AssetModel::factory()->create([ - 'name' => 'massa id', - 'fieldset_id' => $customFieldSet->id, - 'category_id' => 1, - 'manufacturer_id' => 1, - 'model_number' => null, - ]); - - $this->import(new AssetImporter($csv)); - $updatedCSV = <<<'EOT' -Serial,Asset Tag,weight -67433477,970882174-8,115 -EOT; - $importer = new AssetImporter($updatedCSV); - $importer->setUserId(1) - ->setUpdating(true) - ->setUsernameFormat('firstname.lastname') - ->import(); - - $this->tester->seeRecord('assets', [ - 'asset_tag' => '970882174-8', - '_snipeit_weight_2' => 115, - ]); - } - - public function initializeCustomFields() - { - $customField = \App\Models\CustomField::factory()->create(['name' => 'Weight']); - $customFieldSet = \App\Models\CustomFieldset::factory()->create(['name' => 'Default']); - $customFieldSet->fields()->attach($customField, [ - 'required' => false, - 'order' => 'asc', ]); - - $am = \App\Models\AssetModel::factory()->create([ - 'name' => 'massa id', - 'fieldset_id' => $customFieldSet->id, - ]); - } - - public function testCustomMappingImport() - { - $this->signIn(); - $csv = <<<'EOT' -Full Name,Email,Username,object name,Cat,Model name,Manufacturer,Model Number,Serial,Asset,Loc,Some Notes,Purchase Date,Purchase Cost,comp,Status,Warranty,Supplier -Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,133289.59,Alpha,Undeployable,14,Blogspan -EOT; - - $customFieldMap = [ - 'asset_tag' => 'Asset', - 'category' => 'Cat', - 'company' => 'comp', - 'item_name' => 'object name', - 'expiration_date' => 'expiration date', - 'location' => 'loc', - 'notes' => 'Some Notes', - 'asset_model' => 'model name', - ]; - - $this->import(new AssetImporter($csv), $customFieldMap); - // Did we create a user? - $this->tester->seeRecord('users', [ - 'first_name' => 'Bonnie', - 'last_name' => 'Nelson', - 'email' => 'bnelson0@cdbaby.com', - ]); - // Grab the user record for use in asserting assigned_to - $createdUser = $this->tester->grabRecord('users', [ - 'first_name' => 'Bonnie', - 'last_name' => 'Nelson', - 'email' => 'bnelson0@cdbaby.com', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'quam', - ]); - - $this->tester->seeRecord('models', [ - 'name' => 'massa id', - 'model_number' => 6377018600094472, - ]); - - $this->tester->seeRecord('manufacturers', [ - 'name' => 'Linkbridge', - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'Daping', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Alpha', - ]); - - $this->tester->seeRecord('status_labels', [ - 'name' => 'Undeployable', - ]); - - $this->tester->seeRecord('suppliers', [ - 'name' => 'Blogspan', - ]); - - $this->tester->seeRecord('assets', [ - 'name' => 'eget nunc donec quis', - 'serial' => '27aa8378-b0f4-4289-84a4-405da95c6147', - 'asset_tag' => '970882174-8', - 'notes' => 'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.', - 'purchase_date' => '2016-04-05 00:00:01', - 'purchase_cost' => 133289.59, - 'warranty_months' => 14, - 'assigned_to' => $createdUser['id'], - 'assigned_type' => User::class, - ]); - } - - public function testDefaultAccessoryImport() - { - $csv = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity -Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 -EOT; - $this->import(new AccessoryImporter($csv)); - $this->tester->seeRecord('accessories', [ - 'name' => 'Walter Carter', - 'purchase_date' => '2006-09-01 00:00:01', - 'order_number' => 'J935H60W', - 'requestable' => 0, - 'qty' => 278, - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'metus. Vivamus', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Macromedia', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'Customers', - ]); - } - - public function testDefaultAccessoryUpdate() - { - $csv = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity -Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 -EOT; - $this->import(new AccessoryImporter($csv)); - $this->tester->seeNumRecords(1, 'accessories'); - - $updatedCSV = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity -Walter Carter,09/01/2015,350,metus. Vivamus,Macromedia,35GGH,Customers,True,12 -EOT; - $importer = new AccessoryImporter($updatedCSV); - $importer->setUserId(1) - ->setUpdating(true) - ->import(); - // At this point we should still only have one record. - $this->tester->seeNumRecords(1, 'accessories'); - // But instead these. - $this->tester->seeRecord('accessories', [ - 'name' => 'Walter Carter', - 'purchase_date' => '2015-09-01 00:00:01', - 'order_number' => '35GGH', - 'requestable' => 1, - 'qty' => 12, - ]); - } - - public function testCustomAccessoryImport() - { - $csv = <<<'EOT' -Name,Pur Date,Cost,Loc,Comp,Order Num,Cat,Request,Quan -Walter Carter,09/01/2006,,metus. Vivamus,Macromedia,J935H60W,Customers,False,278 -EOT; - - $customFieldMap = [ - 'category' => 'Cat', - 'company' => 'Comp', - 'item_name' => 'Name', - 'location' => 'Loc', - 'purchase_date' => 'Pur Date', - 'purchase_cost' => 'Cost', - 'order_number' => 'Order Num', - 'requestable' => 'Request', - 'quantity' => 'Quan', - ]; - $this->import(new AccessoryImporter($csv), $customFieldMap); - // dd($this->tester->grabRecord('accessories')); - $this->tester->seeRecord('accessories', [ - 'name' => 'Walter Carter', - 'purchase_date' => '2006-09-01 00:00:01', - 'order_number' => 'J935H60W', - 'requestable' => 0, - 'qty' => 278, - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'metus. Vivamus', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Macromedia', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'Customers', - ]); - } - - public function testDefaultConsumableImport() - { - $csv = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity,Item Number,Model Number -eget,01/03/2011,$85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322,3305,30123 -EOT; - $this->import(new ConsumableImporter($csv)); - $this->tester->seeRecord('consumables', [ - 'name' => 'eget', - 'purchase_date' => '2011-01-03 00:00:01', - 'purchase_cost' => 85.91, - 'order_number' => 'T295T06V', - 'requestable' => 0, - 'qty' => 322, - 'item_no' => 3305, - 'model_number' => 30123, - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'mauris blandit mattis.', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Lycos', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'Triamterene/Hydrochlorothiazide', - ]); - } - - public function testDefaultConsumableUpdate() - { - $csv = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity -eget,01/03/2011,85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322 -EOT; - $this->import(new ConsumableImporter($csv)); - $this->tester->seeNumRecords(1, 'consumables'); - - $updatedCSV = <<<'EOT' -Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity -eget,12/05/2016,35.45,mauris blandit mattis.,Lycos,3666FF,New Cat,Yes,15 -EOT; - $importer = new ConsumableImporter($updatedCSV); - $importer->setUserId(1) - ->setUpdating(true) - ->import(); - // At this point we should still only have one record. - $this->tester->seeNumRecords(1, 'consumables'); - // But instead these. - $this->tester->seeRecord('consumables', [ - 'name' => 'eget', - 'purchase_date' => '2016-12-05 00:00:01', - 'purchase_cost' => 35.45, - 'order_number' => '3666FF', - 'requestable' => 1, - 'qty' => 15, - ]); - } - - public function testCustomConsumableImport() - { - $csv = <<<'EOT' -Name,pur Date,Pur Cost,Loc,Comp,Order Num,Kat,Request,Quan -eget,01/03/2011,85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322 -EOT; - - $customFieldMap = [ - 'category' => 'Kat', - 'company' => 'Comp', - 'item_name' => 'Name', - 'location' => 'Loc', - 'purchase_date' => 'Pur date', - 'purchase_cost' => 'Pur Cost', - 'order_number' => 'Order Num', - 'requestable' => 'Request', - 'quantity' => 'Quan', - ]; - $this->import(new ConsumableImporter($csv), $customFieldMap); - $this->tester->seeRecord('consumables', [ - 'name' => 'eget', - 'purchase_date' => '2011-01-03 00:00:01', - 'purchase_cost' => 85.91, - 'order_number' => 'T295T06V', - 'requestable' => 0, - 'qty' => 322, - ]); - - $this->tester->seeRecord('locations', [ - 'name' => 'mauris blandit mattis.', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Lycos', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'Triamterene/Hydrochlorothiazide', - ]); - } - - public function testDefaultLicenseImport() - { - $this->signIn(); - $csv = <<<'EOT' -Full Name,Email,Username,Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes,asset tag -Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus.,test 1 -EOT; - - // Force create an asset to match the checkout - $testAsset = $this->createValidAsset(['asset_tag' => 'test 1']); - $this->import(new LicenseImporter($csv)); - // dd($this->tester->grabRecord('licenses')); - - // Did we create a user? - $this->tester->seeRecord('users', [ - 'first_name' => 'Helen', - 'last_name' => 'Anderson', - 'email' => 'cspencer0@privacy.gov.au', - ]); - // Grab the user record for use in asserting assigned_to - $createdUser = $this->tester->grabRecord('users', [ - 'first_name' => 'Helen', - 'last_name' => 'Anderson', - 'email' => 'cspencer0@privacy.gov.au', - ]); - $this->tester->seeRecord('licenses', [ - 'name' => 'Argentum Malachite Athletes Foot Relief', - 'purchase_date' => '2012-07-13 00:00:01', - 'seats' => 80, - 'license_email' => 'cspencer0@gov.uk', - 'order_number' => '386436062-5', - 'license_name' => 'Cynthia Spencer', - 'expiration_date' => '2016-01-27', - 'maintained' => 0, - 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', - 'purchase_cost' => 79.66, - 'purchase_order' => '53008', - 'reassignable' => 0, - 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', - ]); - $this->tester->seeRecord('manufacturers', [ - 'name' => 'Beer, Leannon and Lubowitz', - ]); - - $this->tester->seeRecord('suppliers', [ - 'name' => 'Hegmann, Mohr and Cremin', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Haag, Schmidt and Farrell', - ]); - - $this->tester->seeRecord('categories', [ - 'name' => 'Graphics Software', - ]); - - $this->tester->seeNumRecords(80, 'license_seats'); - $this->tester->seeRecord('license_seats', [ - 'assigned_to' => $createdUser['id'], - 'license_id' => \App\Models\License::where('serial', '1aa5b0eb-79c5-40b2-8943-5472a6893c3c')->first()->id, - 'asset_id' => $testAsset->id, - ]); - } - - public function testDefaultLicenseUpdate() - { - $csv = <<<'EOT' -Name,Email,Username,Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes -Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. -EOT; - $this->import(new LicenseImporter($csv)); - $this->tester->seeNumRecords(1, 'licenses'); - - $updatedCSV = <<<'EOT' -Item name,serial,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,category,notes -Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",05/15/2019,$1865.34,63 ar,18334,A Legend,Legendary@gov.uk,04/27/2016,yes,true,64,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. -EOT; - $importer = new LicenseImporter($updatedCSV); - $importer->setUserId(1) - ->setUpdating(true) - ->import(); - // At this point we should still only have one record. - $this->tester->seeNumRecords(1, 'licenses'); - // But instead these. - - \Log::debug($this->tester->grabRecord('licenses')); - $this->tester->seeRecord('licenses', [ - 'name' => 'Argentum Malachite Athletes Foot Relief', - 'purchase_date' => '2019-05-15 00:00:01', - 'seats' => 64, - 'license_email' => 'Legendary@gov.uk', - 'order_number' => '18334', - 'license_name' => 'A Legend', - 'expiration_date' => '2016-04-27', - 'maintained' => 1, - 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', - 'purchase_cost' => 1865.34, - 'purchase_order' => '63 ar', - 'reassignable' => 1, - 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', - ]); - // License seats are soft deleted - $this->tester->seeNumRecords(64, 'license_seats', ['deleted_at' => null]); - } - - public function testCustomLicenseImport() - { - $csv = <<<'EOT' -Name,Email,Username,Object name,serial num,manuf,pur date,pur cost,purc order,order num,Licensed To,Licensed Email,expire date,maint,reass,seat,comp,supplier,category,note -Helen Anderson,cspencer0@privacy.gov.au,cspencer0,Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",07/13/2012,$79.66,53008,386436062-5,Cynthia Spencer,cspencer0@gov.uk,01/27/2016,false,no,80,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Custom Graphics Software,Sed ante. Vivamus tortor. Duis mattis egestas metus. -EOT; - - $customFieldMap = [ - 'company' => 'Comp', - 'expiration_date' => 'expire date', - 'item_name' => 'Object Name', - 'license_email' => 'licensed email', - 'license_name' => 'licensed to', - 'maintained' => 'maint', - 'manufacturer' => 'manuf', - 'notes' => 'note', - 'order_number' => 'Order Num', - 'purchase_cost' => 'Pur Cost', - 'purchase_date' => 'Pur date', - 'purchase_order' => 'Purc Order', - 'quantity' => 'Quan', - 'reassignable' => 'reass', - 'requestable' => 'Request', - 'seats' => 'seat', - 'serial' => 'serial num', - 'category' => 'category', - ]; - $this->import(new LicenseImporter($csv), $customFieldMap); - $this->tester->seeRecord('licenses', [ - 'name' => 'Argentum Malachite Athletes Foot Relief', - 'purchase_date' => '2012-07-13 00:00:01', - 'seats' => 80, - 'license_email' => 'cspencer0@gov.uk', - 'order_number' => '386436062-5', - 'license_name' => 'Cynthia Spencer', - 'expiration_date' => '2016-01-27', - 'maintained' => 0, - 'notes' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus.', - 'purchase_cost' => 79.66, - 'purchase_order' => '53008', - 'reassignable' => 0, - 'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c', - ]); - - $this->tester->seeRecord('manufacturers', [ - 'name' => 'Beer, Leannon and Lubowitz', - ]); - - $this->tester->seeRecord('suppliers', [ - 'name' => 'Hegmann, Mohr and Cremin', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Haag, Schmidt and Farrell', - ]); - - $this->tester->seeNumRecords(80, 'license_seats'); - } - - public function testDefaultUserImport() - { - Notification::fake(); - $this->signIn(); - $csv = <<<'EOT' -First Name,Last Name,email,Username,Location,Phone Number,Job Title,Employee Number,Company,Department,activated -Blanche,O'Collopy,bocollopy0@livejournal.com,bocollopy0,Hinapalanan,63-(199)661-2186,Clinical Specialist,7080919053,Morar-Ward,Management,1 -Jessie,Primo,,jprimo1,Korenovsk,7-(885)578-0266,Paralegal,6284292031,Jast-Stiedemann,1 - -EOT; - $user_importer = new UserImporter($csv); - $user_importer->sendWelcome(); - $this->import($user_importer); - - $this->tester->seeRecord('users', [ - 'first_name' => 'Blanche', - 'last_name' => "O'Collopy", - 'email' => 'bocollopy0@livejournal.com', - 'username' => 'bocollopy0', - 'phone' => '63-(199)661-2186', - 'jobtitle' => 'Clinical Specialist', - 'employee_num' => '7080919053', - ]); - - $this->tester->seeRecord('companies', [ - 'name' => 'Morar-Ward', - ]); - - $this->tester->seeRecord('departments', [ - 'name' => 'Management', - ]); - - Notification::assertSentTo(User::find(2), \App\Notifications\WelcomeNotification::class); - Notification::assertNotSentTo(User::find(3), \App\Notifications\WelcomeNotification::class); - } - - private function import($importer, $mappings = null) - { - if ($mappings) { - $importer->setFieldMappings($mappings); - } - $importer->setUserId(1) - ->setUpdating(false) - ->setUsernameFormat('firstname.lastname') - ->import(); - } -} diff --git a/tests/unit/ManufacturerTest.php b/tests/unit/ManufacturerTest.php deleted file mode 100644 index 15f62e408..000000000 --- a/tests/unit/ManufacturerTest.php +++ /dev/null @@ -1,26 +0,0 @@ -make(); - // $values = [ - // 'name' => $manufacturers->name, - // ]; - - // Manufacturer::create($values); - // $this->tester->seeRecord('manufacturers', $values); - // } -} diff --git a/tests/unit/NotificationTest.php b/tests/unit/NotificationTest.php deleted file mode 100644 index 72d815b49..000000000 --- a/tests/unit/NotificationTest.php +++ /dev/null @@ -1,36 +0,0 @@ -superuser()->create(); - Auth::login($admin); - $cat = $this->createValidCategory('asset-laptop-category', ['require_acceptance' => true]); - $model = $this->createValidAssetModel('mbp-13-model', ['category_id' => $cat->id]); - $asset = $this->createValidAsset(['model_id' => $model->id]); - $user = $this->createValidUser(); - - Notification::fake(); - $asset->checkOut($user, 1); - Notification::assertSentTo($user, CheckoutAssetNotification::class); - } -} diff --git a/tests/unit/PermissionsTest.php b/tests/unit/PermissionsTest.php deleted file mode 100644 index 8c7d3a101..000000000 --- a/tests/unit/PermissionsTest.php +++ /dev/null @@ -1,511 +0,0 @@ -noHardware = [ - 'assets.view' => false, - 'assets.create' => false, - 'assets.edit' => false, - 'assets.delete' => false, - ]; - - $this->noLicenses = [ - 'licenses.view' => false, - 'licenses.create' => false, - 'licenses.edit' => false, - 'licenses.delete' => false, - ]; - - $this->noAccessories = [ - 'accessories.view' => false, - 'accessories.create' => false, - 'accessories.edit' => false, - 'accessories.delete' => false, - ]; - - $this->noConsumables = [ - 'consumables.view' => false, - 'consumables.create' => false, - 'consumables.edit' => false, - 'consumables.delete' => false, - ]; - - $this->noComponents = [ - 'components.view' => false, - 'components.create' => false, - 'components.edit' => false, - 'components.delete' => false, - ]; - - $this->noUsers = [ - 'users.view' => false, - 'users.create' => false, - 'users.edit' => false, - 'users.delete' => false, - ]; - } - - private $noHardware; - private $noLicenses; - private $noAccessories; - private $noConsumables; - private $noComponents; - private $noUsers; - - // tests - - /** - * @test - */ - public function a_user_with_no_permissions_sees_nothing() - { - $u = \App\Models\User::factory()->create(); - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - // $permissions = $this->noHardware; - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_asset_permissions_can_view_assets() - { - $u = \App\Models\User::factory()->viewAssets()->create(); - $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'assets.view' => true, - 'assets.create' => false, - 'assets.edit' => false, - 'assets.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_asset_permissions_can_create_assets() - { - $u = \App\Models\User::factory()->createAssets()->create(); - $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'assets.view' => false, - 'assets.create' => true, - 'assets.edit' => false, - 'assets.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_assets_permissions_can_edit_assets() - { - $u = \App\Models\User::factory()->editAssets()->create(); - - $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'assets.view' => false, - 'assets.create' => false, - 'assets.edit' => true, - 'assets.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_assets_permissions_can_delete_assets() - { - $u = \App\Models\User::factory()->deleteAssets()->create(); - $permissions = $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - $permissions = array_merge($permissions, [ - 'assets.view' => false, - 'assets.create' => false, - 'assets.edit' => false, - 'assets.delete' => true, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_licenses_permissions_can_view_licenses() - { - $u = \App\Models\User::factory()->viewLicenses()->create(); - $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'licenses.view' => true, - 'licenses.create' => false, - 'licenses.edit' => false, - 'licenses.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_licenses_permissions_can_create_licenses() - { - $u = \App\Models\User::factory()->createLicenses()->create(); - $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'licenses.view' => false, - 'licenses.create' => true, - 'licenses.edit' => false, - 'licenses.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_licenses_permissions_can_edit_licenses() - { - $u = \App\Models\User::factory()->editLicenses()->create(); - $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'licenses.view' => false, - 'licenses.create' => false, - 'licenses.edit' => true, - 'licenses.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_licenses_permissions_can_delete_licenses() - { - $u = \App\Models\User::factory()->deleteLicenses()->create(); - $permissions = $this->noHardware + $this->noAccessories + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'licenses.view' => false, - 'licenses.create' => false, - 'licenses.edit' => false, - 'licenses.delete' => true, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_accessories_permissions_can_view_accessories() - { - $u = \App\Models\User::factory()->viewAccessories()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'accessories.view' => true, - 'accessories.create' => false, - 'accessories.edit' => false, - 'accessories.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_accessories_permissions_can_create_accessories() - { - $u = \App\Models\User::factory()->createAccessories()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'accessories.view' => false, - 'accessories.create' => true, - 'accessories.edit' => false, - 'accessories.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_accessories_permissions_can_edit_accessories() - { - $u = \App\Models\User::factory()->editAccessories()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'accessories.view' => false, - 'accessories.create' => false, - 'accessories.edit' => true, - 'accessories.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_accessories_permissions_can_delete_accessories() - { - $u = \App\Models\User::factory()->deleteAccessories()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'accessories.view' => false, - 'accessories.create' => false, - 'accessories.edit' => false, - 'accessories.delete' => true, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_consumables_permissions_can_view_consumables() - { - $u = \App\Models\User::factory()->viewConsumables()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'consumables.view' => true, - 'consumables.create' => false, - 'consumables.edit' => false, - 'consumables.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_consumables_permissions_can_create_consumables() - { - $u = \App\Models\User::factory()->createConsumables()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noConsumables + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'consumables.view' => false, - 'consumables.create' => true, - 'consumables.edit' => false, - 'consumables.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_consumables_permissions_can_edit_consumables() - { - $u = \App\Models\User::factory()->editConsumables()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'consumables.view' => false, - 'consumables.create' => false, - 'consumables.edit' => true, - 'consumables.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_consumables_permissions_can_delete_consumables() - { - $u = \App\Models\User::factory()->deleteConsumables()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noComponents + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'consumables.view' => false, - 'consumables.create' => false, - 'consumables.edit' => false, - 'consumables.delete' => true, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_users_permissions_can_view_users() - { - $u = \App\Models\User::factory()->viewUsers()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; - - $permissions = array_merge($permissions, [ - 'users.view' => true, - 'users.create' => false, - 'users.edit' => false, - 'users.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_users_permissions_can_create_users() - { - $u = \App\Models\User::factory()->createUsers()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; - - $permissions = array_merge($permissions, [ - 'users.view' => false, - 'users.create' => true, - 'users.edit' => false, - 'users.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_users_permissions_can_edit_users() - { - $u = \App\Models\User::factory()->editUsers()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; - - $permissions = array_merge($permissions, [ - 'users.view' => false, - 'users.create' => false, - 'users.edit' => true, - 'users.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_users_permissions_can_delete_users() - { - $u = \App\Models\User::factory()->deleteUsers()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noComponents; - - $permissions = array_merge($permissions, [ - 'users.view' => false, - 'users.create' => false, - 'users.edit' => false, - 'users.delete' => true, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_view_components_permissions_can_view_components() - { - $u = \App\Models\User::factory()->viewComponents()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'components.view' => true, - 'components.create' => false, - 'components.edit' => false, - 'components.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_create_components_permissions_can_create_components() - { - $u = \App\Models\User::factory()->createComponents()->create(); - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'components.view' => false, - 'components.create' => true, - 'components.edit' => false, - 'components.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_edit_components_permissions_can_edit_components() - { - $u = \App\Models\User::factory()->editComponents()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'components.view' => false, - 'components.create' => false, - 'components.edit' => true, - 'components.delete' => false, - ]); - $this->hitRoutes($permissions, $u); - } - - /** - * @test - */ - public function a_user_with_delete_components_permissions_can_delete_components() - { - $u = \App\Models\User::factory()->deleteComponents()->create(); - - $permissions = $this->noHardware + $this->noLicenses + $this->noAccessories + $this->noConsumables + $this->noUsers; - - $permissions = array_merge($permissions, [ - 'components.view' => false, - 'components.create' => false, - 'components.edit' => false, - 'components.delete' => true, - ]); - // dd($u); - $this->hitRoutes($permissions, $u); - } - - private function hitRoutes(array $routes, User $user) - { - foreach ($routes as $route => $expectation) { - $this->assertEquals($user->hasAccess($route), $expectation); - } - } -} diff --git a/tests/unit/StatuslabelTest.php b/tests/unit/StatuslabelTest.php deleted file mode 100644 index 6cbc58223..000000000 --- a/tests/unit/StatuslabelTest.php +++ /dev/null @@ -1,114 +0,0 @@ -rtd()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testPendingStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->pending()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testArchivedStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->archived()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testOutForRepairStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->outForRepair()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testOutForDiagnosticsStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->outForDiagnostics()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testBrokenStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->broken()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } - - public function testLostStatuslabelAdd() - { - $statuslabel = Statuslabel::factory()->lost()->make(); - $values = [ - 'name' => $statuslabel->name, - 'deployable' => $statuslabel->deployable, - 'pending' => $statuslabel->pending, - 'archived' => $statuslabel->archived, - ]; - - Statuslabel::create($values); - $this->tester->seeRecord('status_labels', $values); - } -} diff --git a/tests/unit/SupplierTest.php b/tests/unit/SupplierTest.php deleted file mode 100644 index 856f53c38..000000000 --- a/tests/unit/SupplierTest.php +++ /dev/null @@ -1,26 +0,0 @@ -make(); - // $values = [ - // 'name' => $supplier->name, - // ]; - - // Supplier::create($values); - // $this->tester->seeRecord('suppliers', $values); - // } -}