Closed
Description
What are you trying to achieve?
run all tests after adding a new suite called 'api', forgot to point environment file to .env.testing (sqlite + test mongodb database) in the suite config api.suite.yml.
What do you get instead?
The unit and functional tests used local .env instead which uses my staging/demo mariadb and local mongodb database. Encountered errors due to trying to insert rows with duplicate ids. Mongodb local data wiped out because I use truncate in tearDown function. Mariadb data filled up with test seed data that I did not want to be put in the local database.
The unit and functional tests returned to using .env.testing settings only after removing all api suite files.
Provide console output if related. Use
-vvv
mode for more details.
# paste output here
Provide test source code if related
// paste test
Details
- Codeception version:
2.3.3 - PHP Version:
7.0.13, Laravel 5.4 - Operating System:
Windows 8 - Installation type:
Composer - List of installed packages (
composer show
)
aws/aws-sdk-php 3.34.0 AWS SDK for PHP - Use Amazon...
behat/gherkin v4.4.5 Gherkin DSL parser for PHP 5.3
codeception/codeception 2.3.5 BDD-style testing framework
dnoegel/php-xdg-base-dir 0.1 implementation of xdg base d...
doctrine/inflector v1.2.0 Common String Manipulations ...
doctrine/instantiator 1.0.5 A small, lightweight utility...
erusev/parsedown 1.6.3 Parser for Markdown.
facebook/webdriver 1.4.1 A PHP client for Selenium We...
fzaninotto/faker v1.7.1 Faker is a PHP library that ...
guzzlehttp/guzzle 6.3.0 Guzzle is a PHP HTTP client ...
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.4.2 PSR-7 message implementation...
hamcrest/hamcrest-php v1.2.2 This is the PHP port of Hamc...
jakub-onderka/php-console-color 0.1
jakub-onderka/php-console-highlighter v0.3.2
jenssegers/mongodb v3.2.2 A MongoDB based Eloquent mod...
laravel/framework v5.4.33 The Laravel Framework.
laravel/tinker v1.0.2 Powerful REPL for the Larave...
league/flysystem 1.0.41 Filesystem abstraction: Many...
league/flysystem-aws-s3-v3 1.0.18 Flysystem adapter for the AW...
mockery/mockery 0.9.9 Mockery is a simple yet flex...
mongodb/mongodb 1.1.2 MongoDB driver library
monolog/monolog 1.23.0 Sends your logs to files, so...
mtdowling/cron-expression v1.2.0 CRON for PHP: Calculate the ...
mtdowling/jmespath.php 2.4.0 Declaratively specify how to...
myclabs/deep-copy 1.6.1 Create deep copies (clones) ...
nesbot/carbon 1.22.1 A simple API extension for D...
nikic/php-parser v3.1.0 A PHP parser written in PHP
paragonie/random_compat v2.0.10 PHP 5.x polyfill for random_...
phpdocumentor/reflection-common 1.0 Common reflection classes us...
phpdocumentor/reflection-docblock 3.2.2 With this component, a libra...
phpdocumentor/type-resolver 0.3.0
phpspec/prophecy v1.7.0 Highly opinionated mocking f...
phpunit/php-code-coverage 4.0.8 Library that provides collec...
phpunit/php-file-iterator 1.4.2 FilterIterator implementatio...
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 1.0.9 Utility class for timing
phpunit/php-token-stream 2.0.1 Wrapper around PHP's tokeniz...
phpunit/phpunit 5.7.21 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 3.4.4 Mock Object library for PHPUnit
psr/http-message 1.0.1 Common interface for HTTP me...
psr/log 1.0.2 Common interface for logging...
psy/psysh v0.8.11 An interactive shell for mod...
ramsey/uuid 3.7.0 Formerly rhumsaa/uuid. A PHP...
sebastian/code-unit-reverse-lookup 1.0.1 Looks up which function or m...
sebastian/comparator 1.2.4 Provides the functionality t...
sebastian/diff 1.4.3 Diff implementation
sebastian/environment 2.0.0 Provides functionality to ha...
sebastian/exporter 2.0.0 Provides the functionality t...
sebastian/global-state 1.1.1 Snapshotting of global state
sebastian/object-enumerator 2.0.1 Traverses array structures a...
sebastian/recursion-context 2.0.0 Provides functionality to re...
sebastian/resource-operations 1.0.0 Provides a list of PHP built...
sebastian/version 2.0.1 Library that helps with mana...
stecman/symfony-console-completion 0.7.0 Automatic BASH completion fo...
swiftmailer/swiftmailer v5.4.8 Swiftmailer, free feature-ri...
symfony/browser-kit v3.3.6 Symfony BrowserKit Component
symfony/console v3.3.6 Symfony Console Component
symfony/css-selector v3.3.6 Symfony CssSelector Component
symfony/debug v3.3.6 Symfony Debug Component
symfony/dom-crawler v3.3.6 Symfony DomCrawler Component
symfony/event-dispatcher v3.3.6 Symfony EventDispatcher Comp...
symfony/finder v3.3.6 Symfony Finder Component
symfony/http-foundation v3.3.6 Symfony HttpFoundation Compo...
symfony/http-kernel v3.3.6 Symfony HttpKernel Component
symfony/polyfill-mbstring v1.5.0 Symfony polyfill for the Mbs...
symfony/process v3.3.6 Symfony Process Component
symfony/routing v3.3.6 Symfony Routing Component
symfony/translation v3.3.6 Symfony Translation Component
symfony/var-dumper v3.3.6 Symfony mechanism for explor...
symfony/yaml v3.3.6 Symfony Yaml Component
tijsverkoyen/css-to-inline-styles 2.2.0 CssToInlineStyles is a class...
vlucas/phpdotenv v2.4.0 Loads environment variables ...
webmozart/assert 1.2.0 Assertions to validate metho... - Suite configuration:
# paste suite config here
actor: UnitTester
modules:
enabled:
- Laravel5:
environment_file: .env.testing
part: ORM
- Db:
dsn: 'sqlite:storage/testing.sqlite'
user: ''
password: ''
- Asserts
- \Helper\Unit
actor: FunctionalTester
modules:
enabled:
- Laravel5:
environment_file: .env.testing
run_database_migrations: true
cleanup: true
- REST:
depends: PhpBrowser
url: 'http://127.0.0.1:8000'
- \Helper\Functional
actor: ApiTester
modules:
enabled:
- \Helper\Api
- REST:
url: 'http://127.0.0.1:8000/api/'
depends: Laravel5
Metadata
Metadata
Assignees
Labels
No labels