Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save des1roer/ab9fdb8dee2859fdf4f0 to your computer and use it in GitHub Desktop.
Save des1roer/ab9fdb8dee2859fdf4f0 to your computer and use it in GitHub Desktop.
<?php
namespace models;
use app\modules\video\models\Video;
use yii\helpers\ArrayHelper;
class BehaviorTest extends \yii\codeception\DbTestCase {
// tests
public function testMe()
{
//$var = new Video();
//codecept_debug($var);
// $book = Video::findOne(5);
// $video = Video::findAll();
// codecept_debug($book);
$model = new Video;
// $new_values = ArrayHelper::map(Yii::$app->db->createCommand('SELECT id FROM review WHERE id IN (1, 2, 3)')->queryAll(), 'id', 'book_id');
$res = ArrayHelper::map($model::find()->all(), 'id', 'name');
codecept_debug($res);
//$this->assertFalse(isset($model->director_list), 'Non-existence of setter where not declared');
//$this->assertEquals(0, count($video->id), 'Review count after save');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment