New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codeception 2.2.3: Setting unknown property: Codeception\Lib\Connector\Yii2\TestMailer::transport #3382

Closed
StalkAlex opened this Issue Jul 28, 2016 · 3 comments

Comments

Projects
None yet
5 participants
@StalkAlex

StalkAlex commented Jul 28, 2016

What are you trying to achieve?

Just run our tests

codecept run functional or unit

What do you get instead?

I get this output, in 2.2.2 everything worked perfectly. It doesn't depend on test code or test type, no matter what suite was started testing, it shows first test name and then throws exception.

➜  /vagrant codecept run functional
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.7 by Sebastian Bergmann and contributors.

Functional Tests (2) -----------------------------------------------------------------------------
- ErrorPageCept: Ensure that error page works

  [yii\base\UnknownPropertyException]
  Setting unknown property: Codeception\Lib\Connector\Yii2\TestMailer::transport


run [--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--] [<suite>] [<test>]

Details

Running on CentOS 7, installed by composer, PHP 7

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jul 28, 2016

Member

Please run codeception with -vvv flag to get a stack trace.

Member

Naktibalda commented Jul 28, 2016

Please run codeception with -vvv flag to get a stack trace.

@Naktibalda Naktibalda added the Yii label Jul 28, 2016

@bizley

This comment has been minimized.

Show comment
Hide comment
@bizley

bizley Jul 28, 2016

Some here. Win10, php7. -vvv below:

[yii\base\UnknownPropertyException]
Setting unknown property: Codeception\Lib\Connector\Yii2\TestMailer::transport

Exception trace:
() at [...]\vendor\yiisoft\yii2\base\Component.php:197
yii\base\Component->__set() at [...]\vendor\yiisoft\yii2\BaseYii.php:521
yii\BaseYii::configure() at [...]\vendor\yiisoft\yii2\base\Object.php:105
yii\base\Object->__construct() at n/a:n/a
ReflectionClass->newInstanceArgs() at [...]\vendor\yiisoft\yii2\di\Container.php:379
yii\di\Container->build() at [...]\vendor\yiisoft\yii2\di\Container.php:154
yii\di\Container->get() at [...]\vendor\yiisoft\yii2\BaseYii.php:344
yii\BaseYii::createObject() at [...]\vendor\yiisoft\yii2\di\ServiceLocator.php:133
yii\di\ServiceLocator->get() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:237
Codeception\Lib\Connector\Yii2->mockMailer() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:74
Codeception\Lib\Connector\Yii2->startApp() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:55
Codeception\Lib\Connector\Yii2->getApplication() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Module\Yii2.php:142
Codeception\Module\Yii2->_before() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Subscriber\Module.php:58
Codeception\Subscriber\Module->before() at n/a:n/a
call_user_func() at [...]\AppData\Roaming\Composer\vendor\symfony\event-dispatcher\EventDispatcher.php:174
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at [...]\AppData\Roaming\Composer\vendor\symfony\event-dispatcher\EventDispatcher.php:43
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Listener.php:124
Codeception\PHPUnit\Listener->fire() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Listener.php:95
Codeception\PHPUnit\Listener->startTest() at [...]\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Framework\TestResult.php:378
PHPUnit_Framework_TestResult->startTest() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Test\Test.php:68
Codeception\Test\Test->run() at [...]\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Framework\TestSuite.php:747
PHPUnit_Framework_TestSuite->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Runner.php:98
Codeception\PHPUnit\Runner->doEnhancedRun() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\SuiteManager.php:162
Codeception\SuiteManager->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Codecept.php:209
Codeception\Codecept->runSuite() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Codecept.php:178
Codeception\Codecept->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Command\Run.php:329
Codeception\Command\Run->runSuites() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Command\Run.php:256
Codeception\Command\Run->execute() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Command\Command.php:256
Symfony\Component\Console\Command\Command->run() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:815
Symfony\Component\Console\Application->doRunCommand() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:186
Symfony\Component\Console\Application->doRun() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:117
Symfony\Component\Console\Application->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Application.php:103
Codeception\Application->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\codecept:33

bizley commented Jul 28, 2016

Some here. Win10, php7. -vvv below:

[yii\base\UnknownPropertyException]
Setting unknown property: Codeception\Lib\Connector\Yii2\TestMailer::transport

Exception trace:
() at [...]\vendor\yiisoft\yii2\base\Component.php:197
yii\base\Component->__set() at [...]\vendor\yiisoft\yii2\BaseYii.php:521
yii\BaseYii::configure() at [...]\vendor\yiisoft\yii2\base\Object.php:105
yii\base\Object->__construct() at n/a:n/a
ReflectionClass->newInstanceArgs() at [...]\vendor\yiisoft\yii2\di\Container.php:379
yii\di\Container->build() at [...]\vendor\yiisoft\yii2\di\Container.php:154
yii\di\Container->get() at [...]\vendor\yiisoft\yii2\BaseYii.php:344
yii\BaseYii::createObject() at [...]\vendor\yiisoft\yii2\di\ServiceLocator.php:133
yii\di\ServiceLocator->get() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:237
Codeception\Lib\Connector\Yii2->mockMailer() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:74
Codeception\Lib\Connector\Yii2->startApp() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Lib\Connector\Yii2.php:55
Codeception\Lib\Connector\Yii2->getApplication() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Module\Yii2.php:142
Codeception\Module\Yii2->_before() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Subscriber\Module.php:58
Codeception\Subscriber\Module->before() at n/a:n/a
call_user_func() at [...]\AppData\Roaming\Composer\vendor\symfony\event-dispatcher\EventDispatcher.php:174
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at [...]\AppData\Roaming\Composer\vendor\symfony\event-dispatcher\EventDispatcher.php:43
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Listener.php:124
Codeception\PHPUnit\Listener->fire() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Listener.php:95
Codeception\PHPUnit\Listener->startTest() at [...]\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Framework\TestResult.php:378
PHPUnit_Framework_TestResult->startTest() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Test\Test.php:68
Codeception\Test\Test->run() at [...]\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Framework\TestSuite.php:747
PHPUnit_Framework_TestSuite->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\PHPUnit\Runner.php:98
Codeception\PHPUnit\Runner->doEnhancedRun() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\SuiteManager.php:162
Codeception\SuiteManager->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Codecept.php:209
Codeception\Codecept->runSuite() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Codecept.php:178
Codeception\Codecept->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Command\Run.php:329
Codeception\Command\Run->runSuites() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Command\Run.php:256
Codeception\Command\Run->execute() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Command\Command.php:256
Symfony\Component\Console\Command\Command->run() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:815
Symfony\Component\Console\Application->doRunCommand() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:186
Symfony\Component\Console\Application->doRun() at [...]\AppData\Roaming\Composer\vendor\symfony\console\Application.php:117
Symfony\Component\Console\Application->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\src\Codeception\Application.php:103
Codeception\Application->run() at [...]\AppData\Roaming\Composer\vendor\codeception\codeception\codecept:33
@samdark

This comment has been minimized.

Show comment
Hide comment
@samdark

samdark Jul 28, 2016

Collaborator

TestMailer has no transport. Solutions possible:

  1. Add transport to TestMailer.
  2. Don't apply config to TestMailer.
Collaborator

samdark commented Jul 28, 2016

TestMailer has no transport. Solutions possible:

  1. Add transport to TestMailer.
  2. Don't apply config to TestMailer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment