Skip to content

Instantly share code, notes, and snippets.

View terabytesoftw's full-sized avatar
🎯
Enfoque

Wilmer Arambula terabytesoftw

🎯
Enfoque
View GitHub Profile
@viktorprogger
viktorprogger / composer.json
Last active December 23, 2020 11:22
Event testing
{
"name": "root/app",
"require": {
"php": "^7.4",
"yiisoft/yii-event": "3.0.x-dev",
"yiisoft/di": "3.0.x-dev",
"yiisoft/composer-config-plugin": "1.0.x-dev"
},
"minimum-stability": "dev",
"extra": {
@terabytesoftw
terabytesoftw / gist:7ae1dc2b3bd6b852c4f89e056b323607
Last active December 20, 2022 14:05
Codeception For Tests Yii3.
#Add in your composer codeception tests.
$composer require codeception/codeception:^3.0
#Create your directory /tests in your proyect
$mkdir /tests
#Create codepction systems tests with namespaces
$vendor/bin/codecept bootstrap --namespace AppTests
#Custom options codeception.yml:
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;