public function testDeleteUser() { $count1 = User::find()->count(); $user = new User(); $user->username = "******"; $user->password = "******"; $user->fio = "fio"; $user->pol = "male"; $user->email = "*****@*****.**"; $user->save(); $controller = new SiteController(); $controller->actionDeleteuser($user->id); $count2 = User::find()->count(); $this->assert($count1, $count2, 'count before inserting and after deleting are not equals'); /*if($count1 != $count2){ $this->fire('myevent', new TestEvent($this)); }*/ }