This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class TestCase extends PHPUnit_Framework_TestCase | |
| { | |
| private $browser; | |
| protected function setUp() | |
| { | |
| $this->browser = new Browser('firefox'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class SuperUser | |
| { | |
| private $firstName; | |
| private $lastName; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "yaml" | |
| params = YAML::load_file("./Vagrantparams.yml") | |
| Vagrant.configure("2") do |config| | |
| config.vm.network "private_network", :ip => params['ip'] | |
| config.vm.provider :virtualbox do |vb| | |
| vb.customize ["modifyvm", :id, "--memory", params['memory']] | |
| vb.customize ["modifyvm", :id, "--cpus", params['cpus']] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class EmailDomainExtractor implements EmailDomainExtractorInterface | |
| { | |
| /** | |
| * @param string $email | |
| * @return string | |
| */ | |
| public function extract($email) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sourceSets { | |
| apiTest { | |
| compileClasspath += main.output + test.output | |
| runtimeClasspath += main.output + test.output | |
| } | |
| } | |
| configurations { | |
| apiTestCompile.extendsFrom testCompile | |
| apiTestRuntime.extendsFrom testRuntime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doctrine: | |
| orm: | |
| auto_generate_proxy_classes: "%kernel.debug%" | |
| naming_strategy: doctrine.orm.naming_strategy.underscore | |
| auto_mapping: true | |
| mappings: | |
| model: | |
| type: annotation | |
| dir: %kernel.root_dir%/../src/Site/Model | |
| prefix: Site\Model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| /** |