chrisiek Approved

Member since: 2016-01-27

Recent posts by chrisiek
Post When

Mail templates should be registered in Plugin.php when used in Octobercms but during the tests the e...

Posted in Sending email during phpunit tests

Thank you alxy.

I did this and it worked for me


<?php namespace mydevel\UserExt\Tests\Models;
use E...

Posted in [SOLVED] How to extend the PluginTestCase phpunit class?

This PluginTestCase class sets the db parameters for the sqlite database for good.

    /*
     * Sto...

Posted in [SOLVED] How to extend the PluginTestCase phpunit class?

This change in config/testing/cms.php solved my problem.

//'themesPathLocal' => base_path('tests/fix...

Posted in [SOLVED] PHPUNIT $this->visit('/') still returns some other page content

It looks like during unit tests the theme is not recognized.

1) Mydev\UserExt\Tests\Models\PostTest:...

Posted in [SOLVED] PHPUNIT $this->visit('/') still returns some other page content

I want to make a simple phpunit test but something goes wrong.

...
    <testsuites>
        <testsui...

Posted in [SOLVED] PHPUNIT $this->visit('/') still returns some other page content

This is caused by bug in core code. The solutions is here: https://github.com/octobercms/october/iss...

Posted in Validation doesn't work on columns from the overriding table

This worked for me:

$user = new User;
$user->password = Hash::make('mypassword');
$user->save();

Posted in [Solved] How to create User record in the DB for PHPUnit tests with hashed password?

I have a problem with creating a hashed password. Can somebody give me a clue how to do it?

Posted in [Solved] How to create User record in the DB for PHPUnit tests with hashed password?

I added some code to inspect model in beforeValidate

            $model->bindEvent('model.beforeSave...

Posted in Validation doesn't work on columns from the overriding table