Skip to content

Instantly share code, notes, and snippets.

View yupe's full-sized avatar
🤔

Yupe! team yupe

🤔
View GitHub Profile
<?php
namespace tests\_pages\user;
use yii\codeception\BasePage;
class LoginPage extends BasePage
{
public $route = 'account/login';
@yupe
yupe / gist:6547244
Created September 13, 2013 06:21
А вот так тесты писать приятнее +) Codeception рулит =)
<?php
use \WebGuy;
class UserLoginCest
{
public function testLoginPage(WebGuy $I) {
$I->amOnPage('/user/account/login');
$I->seeInTitle('Войти');
$I->seeLink('Забыли пароль?');
$I->see('Войти');
<?php
$I = new WebGuy($scenario);
$I->wantTo('Test "contact" page of amyLabs site!');
$I->amOnPage('/contact');
// check title
$I->see('Наши контакты','h2');
// check contact information
foreach ($contacts as $contact){
<?php
/**
* Craft by Pixel & Tonic
*
* @package Craft
* @author Pixel & Tonic, Inc.
* @copyright Copyright (c) 2013, Pixel & Tonic, Inc.
* @license http://buildwithcraft.com/license Craft License Agreement
* @link http://buildwithcraft.com
use strict;
use warnings;
use 5.010;
use Data::Dumper;
use Mojo::UserAgent;
use Mojo::JSON;
my $user = 'xomaa';
my $url = "https://api.twitter.com/1/favorites.json?count=3&include_entities=1&id=$user";
my $ua = Mojo::UserAgent->new;
@yupe
yupe / php-storm-format-after
Created September 14, 2011 13:15
после
$comment->setAttributes(array(
'userId' => Yii::app()->user->getId(),
'name' => Yii::app()->user->getState('nickName'),
'email' => Yii::app()->user->getState('email'),
));
@yupe
yupe / php-storm-format
Created September 14, 2011 13:14
До
$comment->setAttributes(array(
'userId' => Yii::app()->user->getId(),
'name' => Yii::app()->user->getState('nickName'),
'email' => Yii::app()->user->getState('email'),
));