Skip to content

Instantly share code, notes, and snippets.

View elnur's full-sized avatar
☁️

Elnur Abdurrakhimov elnur

☁️
  • Earth
View GitHub Profile
/**
* @BeforeScenario
*/
public function initDb()
{
$container = $this->getContainer();
$dir = $container->getParameter('elnur_database.migrations_dir');
$db = $container->get('database_connection');
{
"directory": "vendor",
"json": "component.json"
}
{% block javascripts %}
{% javascripts
'../vendor/jquery/jquery.js'
'../vendor/bootstrap/js/bootstrap-tooltip.js'
'@FOSJsRoutingBundle/Resources/public/js/router.js'
'../app/Resources/public/js/confirmation.js'
'../app/Resources/public/js/*.js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
package functional;
import com.googlecode.flyway.core.Flyway;
import net.experium.manager.TokenManager;
import net.experium.model.Token;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
server {
listen 80;
listen 443 ssl;
server_name site.local;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
root "/vagrant/web";
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
<?php
namespace Example\Manager;
use JMS\DiExtraBundle\Annotation\Inject;
use JMS\DiExtraBundle\Annotation\InjectParams;
use JMS\DiExtraBundle\Annotation\Service;
use Example\Model\User;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
/**
<?php
namespace Example\Manager;
use JMS\DiExtraBundle\Annotation\Inject;
use JMS\DiExtraBundle\Annotation\InjectParams;
use JMS\DiExtraBundle\Annotation\Service;
use Example\Model\User;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
/**
@elnur
elnur / login.feature
Created May 14, 2014 13:03
Aweful UI ridden scenario
Scenario: Successful login
Given a user "Elnur" with password "sw0rdf1sh"
And I am on "/app_test.php/login"
And I fill in "User name" with "Elnur"
And I fill in "Password" with "sw0rdf1sh"
When I press "Log in"
Then the status code should be 200
And I should be on "/app_test.php/home"
And I should see "Welcome, Elnur"
Feature: Discounts for customers
In order to be more motivated to buy more stuff in this shop
As a customer
I want to get discounts when I buy lots of stuff
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
And category "Pure Awesomeness" exists
And product "Super Awesome Stuff" exists
And product "Super Awesome Stuff" is in the "Pure Awesomeness" category