-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
yii\base\ErrorException: Uninitialized string offset: 0 #4447
Comments
How is your asset bundle class defined? The error indicates you have an invalid |
Thank You for your reply. Sorry for the late reply. Here is my AppAsset class which extends AssetBundle class. namespace frontend\assets;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
'css/bootstrap.css',
'css/font-icons/entypo/css/entypo.css',
'css/neon-core.css',
'css/neon-theme.css',
'css/neon-forms.css',
'css/custom.css',
'css/custom.css',
'css/neon-forms.css',
'js/datatables/responsive/css/datatables.responsive.css',
'js/select2/select2-bootstrap.css',
'js/select2/select2.css',
];
public $js = [
'js/gsap/main-gsap.js',
'js/jquery-ui/js/jquery-ui-1.10.3.minimal.min.js',
'js/resizeable.js',
'js/neon-api.js',
'js/select2/select2.min.js',
'js/neon-chat.js',
'js/neon-demo.js',
'js/jquery.validate.min.js',
'js/neon-login.js',
'js/bootstrap.js',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
} |
What is at: /var/www/html/portalv2/portalv2_base/frontend/views/layouts/main_login.php:102 |
Body ends at main_login.php 102 endBody(); ?> |
Run codecept build command after including PHPBrowser as a module in functional.suite.yml and try again. |
I can't tell how this would cause the error. Did you configure |
Hi , |
Hi ,
I got an issue in
yii2
codeception
functional test
. I tried to add functional test for my login page. It works fine for the empty condition and wrong condition, but for success condition I got the above error. Below is the full output. If I remove the success condition it works fine.Codeception PHP Testing Framework v2.0.3
Powered by PHPUnit 4.1.4 by Sebastian Bergmann.
Functional Tests (1) -------------------------------------------------------------------------------------------------------
Trying to Ensure login page works (LoginCept)
Scenario:
ERROR
Couldn't click "login-button":
yii\base\ErrorException: Uninitialized string offset: 0
Scenario Steps:
18. I click "login-button"
17. I fill field "input[name="LoginForm[password]"]","123456"
16. I fill field "input[name="LoginForm[username]"]","test@test.com"
15. I am going to Try to login with correct credentials
14. I see element ".form-login-error_true"
13. I expect to see validations errors
12. I click "login-button"
#1 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/web/AssetBundle.php:147
#2 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/web/View.php:264
#3 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/web/View.php:160
#4 /var/www/html/portalv2/portalv2_base/frontend/views/layouts/main_login.php:102
#5 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/base/View.php:315
#6 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/base/View.php:247
#7 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/base/Controller.php:365
#8 /var/www/html/portalv2/portalv2_base/frontend/controllers/SiteController.php:208
#9 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/base/InlineAction.php:54
#10 /var/www/html/portalv2/portalv2_base/vendor/yiisoft/yii2/base/Controller.php:147
Time: 1.64 seconds, Memory: 22.25Mb
There was 1 error:
FAILURES!
Tests: 1, Assertions: 2, Errors: 1.
The text was updated successfully, but these errors were encountered: