diff --git a/.atoum.php b/.atoum.php index 99a59b3..ce95bfe 100644 --- a/.atoum.php +++ b/.atoum.php @@ -2,29 +2,3 @@ $runner->disableCodeCoverage(); $runner->addTestsFromDirectory(__DIR__ . '/tests/units'); - -## Notifier (growlnotify) -$images = __DIR__ . '/vendor/atoum/atoum/resources/images/logo'; - -$report = $script->AddDefaultReport(); - -if(syslibExist('growlnotify') ) -{ - $notifier = new \mageekguy\atoum\report\fields\runner\result\notifier\image\growl(); - $notifier - ->setSuccessImage($images . DIRECTORY_SEPARATOR . 'success.png') - ->setFailureImage($images . DIRECTORY_SEPARATOR . 'failure.png') - ; - $report->addField($notifier, array(atoum\runner::runStop)); -} - -/** - * Return true if library is available on system - * - * @param string $libName - * @return boolean - */ -function syslibExist($libName) -{ - return !is_null(shell_exec(sprintf('command -v %s 2>/dev/null', $libName))); -} diff --git a/.coke b/.coke new file mode 100644 index 0000000..f580cfa --- /dev/null +++ b/.coke @@ -0,0 +1,7 @@ +# coding standard +standard=PSR2 + +# Path to parse +src + +# Path to ignore diff --git a/.gitignore b/.gitignore index bd9135f..6cb511c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ ## Application files app/config.php bin/* +behat.local.yml +behat.yml deps.lock vendor/ node_modules/ @@ -15,6 +17,8 @@ nbproject/ .settings/ # SublimeText *.sublime-* + # PhpStorm +*.idea # Backup files *.*~ diff --git a/.travis.yml b/.travis.yml index 46a7c12..469b7dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,9 @@ env: php: - 5.3 - 5.4 + - 5.5 + - 5.6 + - 7 before_script: - wget -nc http://getcomposer.org/composer.phar @@ -14,6 +17,6 @@ before_script: - cp app/config_travis.php app/config.php - php app/console db:install --test --load-fixtures -script: ./vendor/bin/atoum -d tests/units +script: ./bin/atoum sudo: false diff --git a/app/bootstrap.php b/app/bootstrap.php index 4c5c7c1..41aec04 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -77,7 +77,6 @@ // Add Twig extensions $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { - $twig->addExtension(new Twig_Extensions_Extension_Debug()); $twig->addExtension(new Twig_Extensions_Extension_Text()); $twig->addGlobal('ga_enabled', $app['ga.enabled']); $twig->addGlobal('ga_ua', $app['ga.ua']); diff --git a/app/config_behat.php b/app/config_behat.php new file mode 100644 index 0000000..af3894f --- /dev/null +++ b/app/config_behat.php @@ -0,0 +1,3 @@ +query(file_get_contents($file)); -}; +$changeEnvironment = function($env) use ($app) { + $env_config = __DIR__.'/config_'.$env.'.php'; -$loadFixtures = function() use ($app, $importFile) { - $importFile(__DIR__.'/../data/sql/fixtures.sql'); + if(file_exists($env_config)) { + require $env_config; + } }; $console = new Application('Aperophp', '1'); $console->register('db:install') ->setDefinition(array( - new InputOption('test', '', InputOption::VALUE_NONE, 'Test mode'), - new InputOption('load-fixtures', '', InputOption::VALUE_NONE, 'Test mode'), + new InputOption('env', 'dev', InputOption::VALUE_OPTIONAL, 'Environment'), + new InputOption('load-fixtures', '', InputOption::VALUE_NONE, 'Import fixtures after database creation'), )) ->setDescription('Create database') - ->setHelp('Usage: php app/console db:install [--test] [--load-fixtures]') + ->setHelp('Usage: php app/console db:install [--env=dev] [--load-fixtures]') ->setCode( - function(InputInterface $input, OutputInterface $output) use ($app, $goToTestEnv, $importFile, $loadFixtures) { - if ($input->getOption('test')) { - $goToTestEnv(); - } + function(InputInterface $input, OutputInterface $output) use ($app, $changeEnvironment) { + $output->writeln('Env : '.$input->getOption('env').''); + $changeEnvironment($input->getOption('env')); + + $databaseTool = new DatabaseTool($app['db']); $output->writeln('Create schema.'); - $importFile(__DIR__ . '/../data/sql/schema.mysql.sql'); + $databaseTool->createSchema(__DIR__ . '/../data/sql/schema.mysql.sql'); if ($input->getOption('load-fixtures')) { $output->writeln('Load fixtures.'); - $loadFixtures(); + $databaseTool->loadFixtures(__DIR__.'/../data/sql/fixtures.sql'); } $output->writeln('Installation done.'); @@ -51,17 +48,19 @@ $console->register('db:install') $console->register('db:load-fixtures') ->setDefinition(array( - new InputOption('test', '', InputOption::VALUE_NONE, 'Test mode'), + new InputOption('env', '', InputOption::VALUE_NONE, 'Environment'), )) ->setDescription('Create database') - ->setHelp('Usage: php app/console db:load-fixtures [--test]') + ->setHelp('Usage: php app/console db:load-fixtures [--env=dev]') ->setCode( - function(InputInterface $input, OutputInterface $output) use ($app, $goToTestEnv, $loadFixtures) { - if ($input->getOption('test')) { - $goToTestEnv(); - } + function(InputInterface $input, OutputInterface $output) use ($app, $changeEnvironment) { + $output->writeln('Env : '.$input->getOption('env').''); + $changeEnvironment($input->getOption('env')); + + $databaseTool = new DatabaseTool($app['db']); - $loadFixtures(); + $output->writeln('Load fixtures'); + $databaseTool->loadFixtures(__DIR__.'/../data/sql/fixtures.sql'); } ); diff --git a/behat.local.yml b/behat.local.yml new file mode 100644 index 0000000..9c8373e --- /dev/null +++ b/behat.local.yml @@ -0,0 +1,7 @@ +default: + context: + parameters: + base_url: http://www.aperophp.dev + extensions: + Behat\MinkExtension\Extension: + base_url: http://www.aperophp.dev diff --git a/bin/tests.sh b/bin/tests.sh index d911888..601c4de 100755 --- a/bin/tests.sh +++ b/bin/tests.sh @@ -1,5 +1,5 @@ #!/bin/sh -php app/console db:install --test --load-fixtures +php app/console db:install --env=test --load-fixtures -./vendor/bin/atoum +./bin/atoum diff --git a/composer.json b/composer.json index c7fa936..1a8617d 100644 --- a/composer.json +++ b/composer.json @@ -5,10 +5,10 @@ "minimum-stability" : "dev", "require": { "silex/silex" : "1.0.*", - "doctrine/common" : "2.4.*", - "doctrine/dbal" : "2.4.*", - "twig/twig" : "1.12.*", - "twig/extensions" : "dev-master", + "doctrine/common" : "~2.4", + "doctrine/dbal" : "~2.4", + "twig/twig" : "~1.12", + "twig/extensions" : "~1.3", "symfony/class-loader" : "2.1.x", "symfony/form" : "2.1.x", "symfony/validator" : "2.1.x", @@ -27,7 +27,12 @@ "tijsverkoyen/akismet" : "1.1.0" }, "require-dev": { - "atoum/atoum" : "dev-master" + "atoum/atoum" : "~2.2", + "behat/behat" : "~2.4", + "behat/mink-extension" : "~1.0", + "behat/mink-goutte-driver" : "~1.0", + "sensiolabs/behat-page-object-extension" : "~1.0", + "bossa/phpspec2-expect" : "dev-master" }, "autoload": { "psr-0": { diff --git a/composer.lock b/composer.lock index 27752ed..09ba471 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "66d72700b9e1567924d9c245094368e6", - "content-hash": "82dd1592ef4ac8c44529a82821e15ea9", + "hash": "4c11be8f94d02f22c9a5a4c5b03c4c0a", + "content-hash": "4c40c05a9a07e8ff03cf2dfc4dd20000", "packages": [ { "name": "Gravatar/Gravatar", @@ -26,16 +26,16 @@ }, { "name": "doctrine/annotations", - "version": "v1.1.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "v1.1.2" + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/40db0c96985aab2822edbc4848b3bd2429e02670", - "reference": "v1.1.2", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", "shasum": "" }, "require": { @@ -43,12 +43,13 @@ "php": ">=5.3.2" }, "require-dev": { - "doctrine/cache": "1.*" + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -61,16 +62,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -79,11 +70,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Docblock Annotations Parser", @@ -93,20 +90,20 @@ "docblock", "parser" ], - "time": "2013-06-16 21:33:03" + "time": "2015-08-31 12:32:49" }, { "name": "doctrine/cache", - "version": "v1.1", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "2c9761ff1d13e188d5f7378066c1ce2882d7a336" + "reference": "dd47003641aa5425820c0ec8a6f4a85e7412ffcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/2c9761ff1d13e188d5f7378066c1ce2882d7a336", - "reference": "2c9761ff1d13e188d5f7378066c1ce2882d7a336", + "url": "https://api.github.com/repos/doctrine/cache/zipball/dd47003641aa5425820c0ec8a6f4a85e7412ffcd", + "reference": "dd47003641aa5425820c0ec8a6f4a85e7412ffcd", "shasum": "" }, "require": { @@ -115,10 +112,15 @@ "conflict": { "doctrine/common": ">2.2,<2.4" }, + "require-dev": { + "phpunit/phpunit": ">=3.7", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { @@ -131,17 +133,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -150,11 +141,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Caching library offering an object-oriented API for many cache backends", @@ -163,7 +160,7 @@ "cache", "caching" ], - "time": "2013-08-07 16:04:25" + "time": "2015-09-16 13:31:45" }, { "name": "doctrine/collections", @@ -171,21 +168,24 @@ "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "bcb53776a096a0c64579cc8d8ec0db62f1109fbc" + "reference": "866e100a425b8b73d15393fd081c6bf067f05bf9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/collections/zipball/866e100a425b8b73d15393fd081c6bf067f05bf9", - "reference": "bcb53776a096a0c64579cc8d8ec0db62f1109fbc", + "reference": "866e100a425b8b73d15393fd081c6bf067f05bf9", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -198,16 +198,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -216,11 +206,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Collections Abstraction library", @@ -230,7 +226,7 @@ "collections", "iterator" ], - "time": "2013-08-29 16:56:45" + "time": "2015-09-11 15:24:21" }, { "name": "doctrine/common", @@ -238,12 +234,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "6a39bb947b20d12a16820f2709509e41e28af005" + "reference": "9f35e74fcbe9011b660e0b423e98c83b7a8699c0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/common/zipball/9f35e74fcbe9011b660e0b423e98c83b7a8699c0", - "reference": "6a39bb947b20d12a16820f2709509e41e28af005", + "reference": "9f35e74fcbe9011b660e0b423e98c83b7a8699c0", "shasum": "" }, "require": { @@ -254,10 +250,13 @@ "doctrine/lexer": "1.*", "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "~4.7" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.6.x-dev" } }, "autoload": { @@ -270,16 +269,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -288,11 +277,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Common Library for Doctrine projects", @@ -304,7 +299,7 @@ "persistence", "spl" ], - "time": "2013-07-02 11:26:20" + "time": "2015-09-16 13:21:47" }, { "name": "doctrine/dbal", @@ -312,29 +307,32 @@ "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "fbce4b50a89352cfe600116ea7267bd1066dc972" + "reference": "f44782e91c8c910736272986f543989d214daf1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/fbce4b50a89352cfe600116ea7267bd1066dc972", - "reference": "fbce4b50a89352cfe600116ea7267bd1066dc972", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/f44782e91c8c910736272986f543989d214daf1c", + "reference": "f44782e91c8c910736272986f543989d214daf1c", "shasum": "" }, "require": { - "doctrine/common": ">=2.4,<2.6-dev", - "php": ">=5.3.2" + "doctrine/common": "~2.4", + "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "4.*", "symfony/console": "2.*" }, "suggest": { - "symfony/console": "Allows use of the command line interface" + "symfony/console": "For helpful console commands such as SQL execution and import of files." }, + "bin": [ + "bin/doctrine-dbal" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.6.x-dev" } }, "autoload": { @@ -347,16 +345,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -364,6 +352,14 @@ { "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" } ], "description": "Database Abstraction Layer", @@ -374,7 +370,7 @@ "persistence", "queryobject" ], - "time": "2013-07-29 00:10:38" + "time": "2015-09-11 16:01:12" }, { "name": "doctrine/inflector", @@ -382,17 +378,20 @@ "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c" + "reference": "097e7ba84f64a427e55008117ef2bb94096731dc" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/inflector/zipball/097e7ba84f64a427e55008117ef2bb94096731dc", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c", + "reference": "097e7ba84f64a427e55008117ef2bb94096731dc", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, "type": "library", "extra": { "branch-alias": { @@ -409,16 +408,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -428,10 +417,16 @@ "email": "kontakt@beberlei.de" }, { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Common String Manipulations with regard to casing and singular/plural rules.", @@ -442,7 +437,7 @@ "singularize", "string" ], - "time": "2013-04-10 16:14:30" + "time": "2015-10-07 18:00:26" }, { "name": "doctrine/lexer", @@ -450,12 +445,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94" + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", "shasum": "" }, "require": { @@ -477,20 +472,17 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", @@ -499,7 +491,7 @@ "lexer", "parser" ], - "time": "2013-03-07 12:15:25" + "time": "2014-09-09 13:34:57" }, { "name": "fortawesome/font-awesome", @@ -665,22 +657,30 @@ }, { "name": "psr/log", - "version": "1.0.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "1.0.0" + "reference": "9e45edca52cc9c954680072c93e621f8b71fab26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "1.0.0", + "url": "https://api.github.com/repos/php-fig/log/zipball/9e45edca52cc9c954680072c93e621f8b71fab26", + "reference": "9e45edca52cc9c954680072c93e621f8b71fab26", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -699,7 +699,7 @@ "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2015-06-02 13:48:41" }, { "name": "silex/silex", @@ -707,12 +707,12 @@ "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "4787bf21e416b9abd5cbf41daf136dae20d56f5c" + "reference": "75b8714f00bf4e64eedc0d9283b03eb05af67196" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/silexphp/Silex/zipball/75b8714f00bf4e64eedc0d9283b03eb05af67196", - "reference": "4787bf21e416b9abd5cbf41daf136dae20d56f5c", + "reference": "75b8714f00bf4e64eedc0d9283b03eb05af67196", "shasum": "" }, "require": { @@ -768,7 +768,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Igor Wiedler", @@ -781,7 +783,7 @@ "keywords": [ "microframework" ], - "time": "2013-09-08 05:31:36" + "time": "2014-06-06 05:48:07" }, { "name": "swiftmailer/swiftmailer", @@ -846,7 +848,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/browser-kit/zipball/0bb8f07107a2911db0fe49c39f96b5018e5ab678", - "reference": "v2.1.11", + "reference": "0bb8f07107a2911db0fe49c39f96b5018e5ab678", "shasum": "" }, "require": { @@ -871,13 +873,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony BrowserKit Component", @@ -896,7 +898,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/class-loader/zipball/0e9d7c12151d4c9942865a049d38e97c6c7288cb", - "reference": "v2.1.11", + "reference": "0e9d7c12151d4c9942865a049d38e97c6c7288cb", "shasum": "" }, "require": { @@ -916,13 +918,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony ClassLoader Component", @@ -941,7 +943,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/config/zipball/51909bf7f5d763d125a67781942d9293f65afae7", - "reference": "v2.1.11", + "reference": "51909bf7f5d763d125a67781942d9293f65afae7", "shasum": "" }, "require": { @@ -958,13 +960,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Config Component", @@ -1000,13 +1002,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Console Component", @@ -1025,7 +1027,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/css-selector/zipball/bf7bb82a099dfb26b018daf70ad1985fea4d2997", - "reference": "v2.1.11", + "reference": "bf7bb82a099dfb26b018daf70ad1985fea4d2997", "shasum": "" }, "require": { @@ -1042,13 +1044,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony CssSelector Component", @@ -1057,38 +1059,38 @@ }, { "name": "symfony/debug", - "version": "dev-master", - "target-dir": "Symfony/Component/Debug", + "version": "2.8.x-dev", "source": { "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "af5033bc37aae356ab04b0f581795d60262fd77e" + "url": "https://github.com/symfony/debug.git", + "reference": "a688bc1aeeb53ee4ed16b8f28de6768fdb8931fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/af5033bc37aae356ab04b0f581795d60262fd77e", - "reference": "af5033bc37aae356ab04b0f581795d60262fd77e", + "url": "https://api.github.com/repos/symfony/debug/zipball/a688bc1aeeb53ee4ed16b8f28de6768fdb8931fc", + "reference": "a688bc1aeeb53ee4ed16b8f28de6768fdb8931fc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9", + "psr/log": "~1.0" }, - "require-dev": { - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, - "suggest": { - "symfony/http-foundation": "", - "symfony/http-kernel": "" + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Debug\\": "" } }, @@ -1103,12 +1105,12 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2013-09-13 12:20:47" + "homepage": "https://symfony.com", + "time": "2015-10-02 16:37:57" }, { "name": "symfony/dom-crawler", @@ -1122,7 +1124,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/bedfd7eb44e3b1224d1e18335d2e36bbbed26cbe", - "reference": "v2.1.11", + "reference": "bedfd7eb44e3b1224d1e18335d2e36bbbed26cbe", "shasum": "" }, "require": { @@ -1145,13 +1147,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony DomCrawler Component", @@ -1170,7 +1172,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e1d18ff0ff6f3e45ac82f000bc221135df635527", - "reference": "v2.1.11", + "reference": "e1d18ff0ff6f3e45ac82f000bc221135df635527", "shasum": "" }, "require": { @@ -1194,13 +1196,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony EventDispatcher Component", @@ -1219,7 +1221,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/Form/zipball/d2edecec0d0f854ed176f7ac32332d44fa31c696", - "reference": "v2.1.11", + "reference": "d2edecec0d0f854ed176f7ac32332d44fa31c696", "shasum": "" }, "require": { @@ -1249,7 +1251,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1272,12 +1276,15 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f9aad386aa4a27ef7b35ba6665afae6689de0a32", - "reference": "329b059893fdcc9399962ca5881d988264123d23", + "reference": "f9aad386aa4a27ef7b35ba6665afae6689de0a32", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, "type": "library", "extra": { "branch-alias": { @@ -1303,11 +1310,11 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "time": "2015-09-28 17:11:22" }, { @@ -1322,26 +1329,29 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/703a8e941aae3adf50fea0780d90ab141ddba27f", - "reference": "f42c09457e6cdebdc34bb1603178c8e69be1565a", + "reference": "703a8e941aae3adf50fea0780d90ab141ddba27f", "shasum": "" }, "require": { "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/debug": "~2.3", + "symfony/debug": "~2.3.24|~2.5.9|~2.6,>=2.6.2", "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.2" + "symfony/http-foundation": "~2.3,>=2.3.4" }, "require-dev": { - "symfony/browser-kit": "~2.2", + "symfony/browser-kit": "~2.3", "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", + "symfony/config": "~2.0,>=2.0.5", "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.2", + "symfony/dom-crawler": "~2.0,>=2.0.5", + "symfony/finder": "~2.0,>=2.0.5", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.0,>=2.0.5", "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", + "symfony/stopwatch": "~2.3", "symfony/templating": "~2.2" }, "suggest": { @@ -1374,12 +1384,12 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2013-09-13 12:20:37" + "homepage": "https://symfony.com", + "time": "2015-10-05 17:32:31" }, { "name": "symfony/locale", @@ -1393,7 +1403,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/Locale/zipball/3ad6a5129809b3815a2b9056eee470dc2877717f", - "reference": "v2.1.11", + "reference": "3ad6a5129809b3815a2b9056eee470dc2877717f", "shasum": "" }, "require": { @@ -1415,7 +1425,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1438,7 +1450,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/1a1319747462c2d457c3e1c8c2c9a26ad4bcb67b", - "reference": "v2.1.11", + "reference": "1a1319747462c2d457c3e1c8c2c9a26ad4bcb67b", "shasum": "" }, "require": { @@ -1455,13 +1467,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony OptionsResolver Component", @@ -1485,7 +1497,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/routing/zipball/8549a3faebaef87d2b938641e5d59beb6912be4b", - "reference": "3085975262bc36dc89929a936056dc6e5cb8a100", + "reference": "8549a3faebaef87d2b938641e5d59beb6912be4b", "shasum": "" }, "require": { @@ -1495,7 +1507,9 @@ "doctrine/common": "~2.2", "psr/log": "~1.0", "symfony/config": "~2.2", - "symfony/yaml": "~2.0" + "symfony/http-foundation": "~2.3", + "symfony/phpunit-bridge": "~2.7", + "symfony/yaml": "~2.0,>=2.0.5" }, "suggest": { "doctrine/common": "", @@ -1524,11 +1538,11 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Routing Component", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "time": "2015-10-01 13:23:50" }, { @@ -1543,7 +1557,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/Translation/zipball/39ba7a5dc560959667c45c9353b70f43182ca4b3", - "reference": "v2.1.11", + "reference": "39ba7a5dc560959667c45c9353b70f43182ca4b3", "shasum": "" }, "require": { @@ -1570,7 +1584,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1593,7 +1609,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e3a48a99971c35ad8d1c5bf36b6b3d22b15df306", - "reference": "v2.1.11", + "reference": "e3a48a99971c35ad8d1c5bf36b6b3d22b15df306", "shasum": "" }, "require": { @@ -1627,13 +1643,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Twig Bridge", @@ -1652,7 +1668,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/Validator/zipball/20e121114768672e0a90a25a378e5b14e1331ec0", - "reference": "v2.1.11", + "reference": "20e121114768672e0a90a25a378e5b14e1331ec0", "shasum": "" }, "require": { @@ -1681,7 +1697,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1753,21 +1771,27 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig-extensions.git", - "reference": "f5b0c84f3699e494c84ee627d7d583e115d2c4a2" + "reference": "449e3c8a9ffad7c2479c7864557275a32b037499" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/449e3c8a9ffad7c2479c7864557275a32b037499", - "reference": "f5b0c84f3699e494c84ee627d7d583e115d2c4a2", + "reference": "449e3c8a9ffad7c2479c7864557275a32b037499", "shasum": "" }, "require": { - "twig/twig": "~1.0" + "twig/twig": "~1.20|~2.0" + }, + "require-dev": { + "symfony/translation": "~2.3" + }, + "suggest": { + "symfony/translation": "Allow the time_diff output to be translated" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1786,35 +1810,38 @@ } ], "description": "Common additional features for Twig that do not directly belong in core", - "homepage": "https://github.com/fabpot/Twig-extensions", + "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", "keywords": [ - "debug", "i18n", "text" ], - "time": "2013-07-02 11:21:55" + "time": "2015-08-22 16:38:35" }, { "name": "twig/twig", - "version": "v1.12.3", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "27f3428b08c7f656d6824359a9d9dee3f5fce31b" + "reference": "efaf5036e6857616379b78648ffdb5fdafb92c87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/27f3428b08c7f656d6824359a9d9dee3f5fce31b", - "reference": "27f3428b08c7f656d6824359a9d9dee3f5fce31b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/efaf5036e6857616379b78648ffdb5fdafb92c87", + "reference": "efaf5036e6857616379b78648ffdb5fdafb92c87", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.2.7" + }, + "require-dev": { + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.22-dev" } }, "autoload": { @@ -1824,16 +1851,24 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3" + "BSD-3-Clause" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com" + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", @@ -1841,7 +1876,7 @@ "keywords": [ "templating" ], - "time": "2013-04-08 12:40:11" + "time": "2015-10-04 08:38:04" } ], "packages-dev": [ @@ -1851,12 +1886,12 @@ "source": { "type": "git", "url": "https://github.com/atoum/atoum.git", - "reference": "d72a56e361142ea16a78924136657db0e65b6b85" + "reference": "8295a17544e0118720debbbff845a84b6f44396e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/atoum/atoum/zipball/8295a17544e0118720debbbff845a84b6f44396e", - "reference": "d72a56e361142ea16a78924136657db0e65b6b85", + "reference": "8295a17544e0118720debbbff845a84b6f44396e", "shasum": "" }, "require": { @@ -1871,12 +1906,18 @@ "mageekguy/atoum": "*" }, "suggest": { + "atoum/stubs": "Provides IDE support (like autocompletion) for atoum", "ext-mbstring": "Provides support for UTF-8 strings" }, "bin": [ "bin/atoum" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, "autoload": { "classmap": [ "classes/" @@ -1917,15 +1958,1433 @@ "test", "unit testing" ], - "time": "2013-09-13 08:51:09" + "time": "2015-10-07 07:58:48" + }, + { + "name": "behat/behat", + "version": "v2.5.4", + "source": { + "type": "git", + "url": "https://github.com/Behat/Behat.git", + "reference": "ba257dd19d47b6e196c4e43995a2d2db4dd95991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Behat/zipball/ba257dd19d47b6e196c4e43995a2d2db4dd95991", + "reference": "ba257dd19d47b6e196c4e43995a2d2db4dd95991", + "shasum": "" + }, + "require": { + "behat/gherkin": "~2.3.0", + "php": ">=5.3.1", + "symfony/config": "~2.0", + "symfony/console": "~2.0", + "symfony/dependency-injection": "~2.0", + "symfony/event-dispatcher": "~2.0", + "symfony/finder": "~2.0", + "symfony/translation": "~2.0", + "symfony/yaml": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.19" + }, + "suggest": { + "behat/mink-extension": "for integration with Mink testing framework", + "behat/symfony2-extension": "for integration with Symfony2 web framework", + "behat/yii-extension": "for integration with Yii web framework" + }, + "bin": [ + "bin/behat" + ], + "type": "library", + "autoload": { + "psr-0": { + "Behat\\Behat": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Scenario-oriented BDD framework for PHP 5.3", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Symfony2" + ], + "time": "2015-01-23 22:18:15" + }, + { + "name": "behat/gherkin", + "version": "2.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/Behat/Gherkin.git", + "reference": "c32e15d92e1a2ce399a1a1c5be7afd965176e86c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/c32e15d92e1a2ce399a1a1c5be7afd965176e86c", + "reference": "c32e15d92e1a2ce399a1a1c5be7afd965176e86c", + "shasum": "" + }, + "require": { + "php": ">=5.3.1", + "symfony/finder": "~2.0" + }, + "require-dev": { + "symfony/config": "~2.0", + "symfony/translation": "~2.0", + "symfony/yaml": "~2.0" + }, + "suggest": { + "symfony/config": "If you want to use Config component to manage resources", + "symfony/translation": "If you want to use Symfony2 translations adapter", + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP 5.3", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "DSL", + "Symfony2", + "parser" + ], + "time": "2014-06-06 00:48:18" + }, + { + "name": "behat/mink", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/minkphp/Mink.git", + "reference": "0769e6d9726c140a54dbf827a438c0f9912749fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/0769e6d9726c140a54dbf827a438c0f9912749fe", + "reference": "0769e6d9726c140a54dbf827a438c0f9912749fe", + "shasum": "" + }, + "require": { + "php": ">=5.3.1", + "symfony/css-selector": "~2.0" + }, + "suggest": { + "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", + "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", + "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", + "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Mink": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Web acceptance testing framework for PHP 5.3", + "homepage": "http://mink.behat.org/", + "keywords": [ + "browser", + "testing", + "web" + ], + "time": "2013-04-13 23:39:27" + }, + { + "name": "behat/mink-browserkit-driver", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/minkphp/MinkBrowserKitDriver.git", + "reference": "63960c8fcad4529faad1ff33e950217980baa64c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/63960c8fcad4529faad1ff33e950217980baa64c", + "reference": "63960c8fcad4529faad1ff33e950217980baa64c", + "shasum": "" + }, + "require": { + "behat/mink": "~1.5.0", + "php": ">=5.3.1", + "symfony/browser-kit": "~2.0", + "symfony/dom-crawler": "~2.0" + }, + "require-dev": { + "silex/silex": "@dev" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Mink\\Driver": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Symfony2 BrowserKit driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "Mink", + "Symfony2", + "browser", + "testing" + ], + "time": "2013-04-13 23:46:30" + }, + { + "name": "behat/mink-extension", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/Behat/MinkExtension.git", + "reference": "c5a47aced3fd3c2a86fe2164264a6dd058b5010d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/MinkExtension/zipball/c5a47aced3fd3c2a86fe2164264a6dd058b5010d", + "reference": "c5a47aced3fd3c2a86fe2164264a6dd058b5010d", + "shasum": "" + }, + "require": { + "behat/behat": "~2.5.0", + "behat/mink": ">=1.4.3,<1.6-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "behat/mink-goutte-driver": "~1.0" + }, + "type": "behat-extension", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\MinkExtension": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com" + } + ], + "description": "Mink extension for Behat", + "homepage": "http://mink.behat.org", + "keywords": [ + "browser", + "gui", + "test", + "web" + ], + "time": "2014-08-05 06:10:35" + }, + { + "name": "behat/mink-goutte-driver", + "version": "v1.0.9", + "source": { + "type": "git", + "url": "https://github.com/minkphp/MinkGoutteDriver.git", + "reference": "fa1b073b48761464feb0b05e6825da44b20118d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/fa1b073b48761464feb0b05e6825da44b20118d8", + "reference": "fa1b073b48761464feb0b05e6825da44b20118d8", + "shasum": "" + }, + "require": { + "behat/mink-browserkit-driver": ">=1.0.5,<1.2.0", + "fabpot/goutte": "~1.0.1", + "php": ">=5.3.1" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Mink\\Driver": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Goutte driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "browser", + "goutte", + "headless", + "testing" + ], + "time": "2013-07-03 18:43:54" + }, + { + "name": "bossa/phpspec2-expect", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/BossaConsulting/phpspec2-expect.git", + "reference": "f3a80b7fa743b8a1078a7e320bd3e8b8b6283780" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/BossaConsulting/phpspec2-expect/zipball/f3a80b7fa743b8a1078a7e320bd3e8b8b6283780", + "reference": "f3a80b7fa743b8a1078a7e320bd3e8b8b6283780", + "shasum": "" + }, + "require": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "autoload": { + "files": [ + "expect.php" + ], + "psr-0": { + "Bossa\\PhpSpec\\Expect\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" + } + ], + "description": "Helper that decorates any SUS with a phpspec lazy object wrapper", + "keywords": [ + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification" + ], + "time": "2014-09-12 09:25:51" + }, + { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "fabpot/goutte", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/Goutte.git", + "reference": "794b196e76bdd37b5155cdecbad311f0a3b07625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/794b196e76bdd37b5155cdecbad311f0a3b07625", + "reference": "794b196e76bdd37b5155cdecbad311f0a3b07625", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "guzzle/http": "~3.1", + "php": ">=5.3.0", + "symfony/browser-kit": "~2.1", + "symfony/css-selector": "~2.1", + "symfony/dom-crawler": "~2.1", + "symfony/finder": "~2.1", + "symfony/process": "~2.1" + }, + "require-dev": { + "guzzle/plugin-history": "~3.1", + "guzzle/plugin-mock": "~3.1" + }, + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Goutte": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A simple PHP Web Scraper", + "homepage": "https://github.com/fabpot/Goutte", + "keywords": [ + "scraper" + ], + "time": "2014-10-09 15:52:51" + }, + { + "name": "guzzle/common", + "version": "v3.9.2", + "target-dir": "Guzzle/Common", + "source": { + "type": "git", + "url": "https://github.com/Guzzle3/common.git", + "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Guzzle3/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", + "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "symfony/event-dispatcher": ">=2.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle\\Common": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Common libraries used by Guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "collection", + "common", + "event", + "exception" + ], + "abandoned": "guzzle/guzzle", + "time": "2014-08-11 04:32:36" + }, + { + "name": "guzzle/http", + "version": "v3.9.2", + "target-dir": "Guzzle/Http", + "source": { + "type": "git", + "url": "https://github.com/Guzzle3/http.git", + "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Guzzle3/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", + "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", + "shasum": "" + }, + "require": { + "guzzle/common": "self.version", + "guzzle/parser": "self.version", + "guzzle/stream": "self.version", + "php": ">=5.3.2" + }, + "suggest": { + "ext-curl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle\\Http": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "HTTP libraries used by Guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "client", + "curl", + "http", + "http client" + ], + "abandoned": "guzzle/guzzle", + "time": "2014-08-11 04:32:36" + }, + { + "name": "guzzle/parser", + "version": "v3.9.2", + "target-dir": "Guzzle/Parser", + "source": { + "type": "git", + "url": "https://github.com/Guzzle3/parser.git", + "reference": "6874d171318a8e93eb6d224cf85e4678490b625c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Guzzle3/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", + "reference": "6874d171318a8e93eb6d224cf85e4678490b625c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle\\Parser": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Interchangeable parsers used by Guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "URI Template", + "cookie", + "http", + "message", + "url" + ], + "abandoned": "guzzle/guzzle", + "time": "2014-02-05 18:29:46" + }, + { + "name": "guzzle/stream", + "version": "v3.9.2", + "target-dir": "Guzzle/Stream", + "source": { + "type": "git", + "url": "https://github.com/Guzzle3/stream.git", + "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Guzzle3/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", + "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0", + "shasum": "" + }, + "require": { + "guzzle/common": "self.version", + "php": ">=5.3.2" + }, + "suggest": { + "guzzle/http": "To convert Guzzle request objects to PHP streams" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle\\Stream": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle stream wrapper component", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "component", + "stream" + ], + "abandoned": "guzzle/guzzle", + "time": "2014-05-01 21:36:02" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/php-diff", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/php-diff.git", + "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", + "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Diff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Chris Boulton", + "homepage": "http://github.com/chrisboulton" + } + ], + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "time": "2013-11-01 13:02:21" + }, + { + "name": "phpspec/phpspec", + "version": "2.1.0-RC1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/phpspec.git", + "reference": "fbd1e6c577cb64302df2b416407fda396db7e102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/fbd1e6c577cb64302df2b416407fda396db7e102", + "reference": "fbd1e6c577cb64302df2b416407fda396db7e102", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "~1.0,>=1.0.1", + "php": ">=5.3.3", + "phpspec/php-diff": "~1.0.0", + "phpspec/prophecy": "~1.1", + "sebastian/exporter": "~1.0", + "symfony/console": "~2.1", + "symfony/event-dispatcher": "~2.1", + "symfony/finder": "~2.1", + "symfony/process": "~2.1", + "symfony/yaml": "~2.1" + }, + "require-dev": { + "behat/behat": "~3.0", + "bossa/phpspec2-expect": "~1.0", + "symfony/filesystem": "~2.1" + }, + "suggest": { + "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" + }, + "bin": [ + "bin/phpspec" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "PhpSpec": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" + } + ], + "description": "Specification-oriented BDD framework for PHP 5.3+", + "homepage": "http://phpspec.net/", + "keywords": [ + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification", + "testing", + "tests" + ], + "time": "2014-09-14 12:22:14" + }, + { + "name": "phpspec/prophecy", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4f9b1eaf0a7da77c362f8d91cbc68ab1f4718d62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4f9b1eaf0a7da77c362f8d91cbc68ab1f4718d62", + "reference": "4f9b1eaf0a7da77c362f8d91cbc68ab1f4718d62", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-09-22 14:49:23" + }, + { + "name": "sebastian/comparator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6899b3e33bfbd386d88b5eea5f65f563e8793051", + "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-06-22 14:15:55" + }, + { + "name": "sebastian/exporter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "f88f8936517d54ae6d589166810877fb2015d0a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f88f8936517d54ae6d589166810877fb2015d0a2", + "reference": "f88f8936517d54ae6d589166810877fb2015d0a2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-08-09 04:23:41" + }, + { + "name": "sebastian/recursion-context", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-06-21 08:04:50" + }, + { + "name": "sensiolabs/behat-page-object-extension", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/BehatPageObjectExtension.git", + "reference": "e0789422d3ab2f50059597cdafbef637db7432d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/BehatPageObjectExtension/zipball/e0789422d3ab2f50059597cdafbef637db7432d4", + "reference": "e0789422d3ab2f50059597cdafbef637db7432d4", + "shasum": "" + }, + "require": { + "behat/behat": "~2.4", + "behat/mink-extension": "~1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "behat/mink-goutte-driver": "~1.0", + "bossa/phpspec2-expect": "~1.0", + "phpspec/phpspec": "~2.0", + "symfony/filesystem": "~2.3", + "symfony/process": "~2.3" + }, + "suggest": { + "bossa/phpspec2-expect": "Allows to use PHPSpec2 matchers in Behat context files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "SensioLabs\\Behat\\PageObjectExtension\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcello Duarte", + "email": "mduarte@inviqa.com" + }, + { + "name": "Jakub Zalas", + "email": "jzalas@sensiolabs.co.uk" + } + ], + "description": "Page object extension for Behat", + "homepage": "https://github.com/sensiolabs/BehatPageObjectExtension", + "keywords": [ + "BDD", + "Behat", + "page" + ], + "time": "2014-05-21 21:55:29" + }, + { + "name": "symfony/dependency-injection", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "70760d20f55ae20f34332ced5b49de7b3fedc21c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/70760d20f55ae20f34332ced5b49de7b3fedc21c", + "reference": "70760d20f55ae20f34332ced5b49de7b3fedc21c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "conflict": { + "symfony/expression-language": "<2.6" + }, + "require-dev": { + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/yaml": "~2.1|~3.0.0" + }, + "suggest": { + "symfony/config": "", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "time": "2015-10-06 07:36:27" + }, + { + "name": "symfony/finder", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "dc3598fe55e1016a04479387cef13cd703050560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/dc3598fe55e1016a04479387cef13cd703050560", + "reference": "dc3598fe55e1016a04479387cef13cd703050560", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2015-10-06 17:12:59" + }, + { + "name": "symfony/process", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "69d7a410cf97857296f62f662105db4101fabdc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/69d7a410cf97857296f62f662105db4101fabdc5", + "reference": "69d7a410cf97857296f62f662105db4101fabdc5", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2015-10-06 17:12:59" + }, + { + "name": "symfony/yaml", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "36ddab7971364b20229155cd972631a2257d7dac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/36ddab7971364b20229155cd972631a2257d7dac", + "reference": "36ddab7971364b20229155cd972631a2257d7dac", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2015-10-02 12:38:01" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "twig/extensions": 20, "michelf/php-markdown": 20, - "atoum/atoum": 20 + "bossa/phpspec2-expect": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/composer.phar b/composer.phar deleted file mode 100755 index 548bef5..0000000 Binary files a/composer.phar and /dev/null differ diff --git a/src/Aperophp/Database/Tool.php b/src/Aperophp/Database/Tool.php new file mode 100644 index 0000000..9ca79ab --- /dev/null +++ b/src/Aperophp/Database/Tool.php @@ -0,0 +1,79 @@ +db = $db; + } + + /** + * Create schema from filename into current connexion + * + * @param string $schema_filename Database schema filename + * @return boolean + */ + public function createSchema($schema_filename) + { + $this->executeQuery($this->getQueryFromFile($schema_filename)); + } + + /** + * Load fixtures into database + * + * @param string|array $fixtures Could be filename or array of filename + * @return boolean + */ + public function loadFixtures($fixtures) + { + if(!is_array($fixtures)) { + $fixtures = array($fixtures); + } + + foreach($fixtures as $fixture) + { + $this->executeQuery($this->getQueryFromFile($fixture)); + } + } + + /** + * Execute given SQL query into current database + * + * @param string $query SQL query string + * @return TODO + */ + protected function executeQuery($query) + { + return $this->db->query($query); + } + + /** + * Get content from file + * + * @param string $filename + * @return string + */ + protected function getQueryFromFile($filename) + { + if(!file_exists($filename)) { + throw new \InvalidArgumentException(sprintf("File '%s' does not exists", $filename)); + } + + if(!is_readable($filename)) { + throw new \InvalidArgumentException(sprintf("File '%s' is not readable", $filename)); + } + + return file_get_contents($filename); + } +} diff --git a/src/Aperophp/Provider/Controller/Member.php b/src/Aperophp/Provider/Controller/Member.php index fc5707f..9b17f4e 100644 --- a/src/Aperophp/Provider/Controller/Member.php +++ b/src/Aperophp/Provider/Controller/Member.php @@ -131,7 +131,7 @@ public function connect(Application $app) $app['db']->rollback(); } catch (\Exception $e) { } - $app->abort(500, 'Impossible de vous inscrire. Merci de réessayer plus tard.'); + $app->abort(500, 'Impossible de vous inscrire. Merci de réessayer plus tard. ['.$e->getMessage().']'); } $app['session']->getFlashBag()->add('success', 'Votre compte a été créé avec succès.'); diff --git a/src/Aperophp/Provider/Controller/Participate.php b/src/Aperophp/Provider/Controller/Participate.php index d0b7bc7..9063b80 100644 --- a/src/Aperophp/Provider/Controller/Participate.php +++ b/src/Aperophp/Provider/Controller/Participate.php @@ -103,7 +103,7 @@ public function connect(Application $app) $app['session']->getFlashBag()->add('success', 'Participation ajoutée.'); if ($participation['percentage'] > 0) { - $app['mailer']->send($app['mail_factory']->createParticipation($user, $drink)); + $app['mailer']->send($app['mail_factory']->createParticipation($user, $drink)); } return $returnValue; diff --git a/src/Aperophp/Test/Test.php b/src/Aperophp/Test/Test.php index f4c4964..193fec7 100644 --- a/src/Aperophp/Test/Test.php +++ b/src/Aperophp/Test/Test.php @@ -6,6 +6,16 @@ class Test extends atoum\test { + /** + * @var \Silex\Application + */ + protected $app; + + /** + * Initialize application + * + * @param $method Method name + */ public function beforeTestMethod($method) { $this->app = require __DIR__.'/../../../app/app.php'; diff --git a/src/Resources/views/drink/_participate.html.twig b/src/Resources/views/drink/_participate.html.twig index c3634c0..05918f2 100644 --- a/src/Resources/views/drink/_participate.html.twig +++ b/src/Resources/views/drink/_participate.html.twig @@ -39,7 +39,7 @@
{{ form_errors(participationForm.reminder) }}
diff --git a/src/Resources/views/member/signup.html.twig b/src/Resources/views/member/signup.html.twig index d4a9724..43afe82 100644 --- a/src/Resources/views/member/signup.html.twig +++ b/src/Resources/views/member/signup.html.twig @@ -10,7 +10,7 @@

Inscription

-
+
{{ form_label(form.user.lastname, null, { 'label_attr': {'class': 'control-label'} }) }} diff --git a/tests/functional/0001-homepage.feature b/tests/functional/0001-homepage.feature new file mode 100644 index 0000000..6ca6cd8 --- /dev/null +++ b/tests/functional/0001-homepage.feature @@ -0,0 +1,29 @@ +# language: fr + +Fonctionnalité: La homepage fonctionne correctement + + Scénario: La page s'affiche correctement + Quand je vais sur la page d'accueil + Alors la page "/" s'affiche correctement + + Scénario: Le menu est correctement affiché + Quand je vais sur la page d'accueil + Alors le menu est affiché + Et le menu contient ces éléments: + | libellé | lien | + | Accueil | / | + | Organiser un apéro | /new.html | + | Liste des apéros | /list.html | + | S'inscrire | /member/signup.html | + | Se connecter | /member/signin.html | + + Scénario: La liste des apéritifs à venir est affichée + Quand je vais sur la page d'accueil + Alors le bloc "A venir" est visible + Et l'apéritif du "19 Juillet" à "Paris" est visible + Et l'apéritif du "19 Juillet" à "Lyon" n'est pas visible + + Scénario: Le bloc de création d'un apéritif est disponible + Quand je vais sur la page d'accueil + Alors le bloc "Les apéros PHP" est visible + Et il est possible de créer un apéro diff --git a/tests/functional/0010-account.feature b/tests/functional/0010-account.feature new file mode 100644 index 0000000..cb676f1 --- /dev/null +++ b/tests/functional/0010-account.feature @@ -0,0 +1,18 @@ +# language: fr + +Fonctionnalité: La gestion des comptes est fonctionnelle + + Scénario: Il est possible de s'inscrire + Quand je vais sur la page d'inscription + Alors la page d'inscription s'affiche correctement + Quand je me créé un compte "test_behat"/"password"/"test_behat@test.fr" + Alors imprimer la dernière réponse + Alors la page de connexion s'affiche correctement + Et le message de succès "Votre compte a été créé avec succès." s'affiche + + # Scénario: Il est possible de se connecter + # Quand je vais sur la page de connexion + # Alors la page de connexion s'affiche correctement + # Quand je me connecte avec les identifiants "test_behat"/"password" + # Alors je suis sur la page d'accueil + # Et je suis connecté en tant que "test_behat" diff --git a/tests/functional/TODO.md b/tests/functional/TODO.md new file mode 100644 index 0000000..472b8e7 --- /dev/null +++ b/tests/functional/TODO.md @@ -0,0 +1,24 @@ +Pré-requis + + * DONE Reprendre le process de création de schéma de bdd pour être plus indépendant de la ligne de commande + * DONE Créer un controler Behat qui se connecte sur une BDD de dev + * DONE Monter la volée une base de données SQLite avant chaque test Behat + +Tests Behat + + * Compte + * S'incrire + * Se connecter + * Se déconnecter + + * Apéro + * Liste des apéros + * Consulter un apéro + * S'inscrire à un apéro + * Déposer un commentaire + * Créer un apéro + * Modifier un apéro + +MEP + + * Modifier Capistrano pour ne pas déployer le controler Behat diff --git a/tests/functional/bootstrap/Context/HomepageContext.php b/tests/functional/bootstrap/Context/HomepageContext.php new file mode 100644 index 0000000..2f3cf9b --- /dev/null +++ b/tests/functional/bootstrap/Context/HomepageContext.php @@ -0,0 +1,102 @@ +getPage('Homepage')->getElement('Menu'); + } catch (ElementNotFoundException $e) { + throw new \LogicException('Le menu n\'est pas affiché'); + } + } + + /** + * @Given /^le menu contient ces éléments:$/ + */ + public function leMenuContientCesElements(TableNode $table) + { + $expected_menus = $table->getHash(); + $nb_menus = $this->getPage('Homepage')->getElement('Menu')->countLinks(); + + // Exactly same number of link allow to check if there is no extra elements + if (count($expected_menus) !== $nb_menus) { + throw new \LogicException( + sprintf( + 'Le nombre d\'éléments attendus (%d) ne correspond pas au nombre d\'élément trouvés (%s)', + count($expected_menus), + $nb_menus + ) + ); + } + + // Each link correspond to expected one + foreach ($expected_menus as $expected_menu) { + $label = $expected_menu['libellé']; + $link = $expected_menu['lien']; + + if (!$this->getPage('Homepage')->getElement('Menu')->isLinkExists($label, $link)) { + throw new \LogicException( + sprintf( + 'Le menu \'%s\' (%s) n\'est pas présent sur la page', + $label, + $link + ) + ); + } + } + } + + /** + * @Given /^le bloc "([^"]*)" est visible$/ + */ + public function leBlocEstVisible($bloc_name) + { + if (!$this->getPage('Homepage')->hasBlock($bloc_name)) { + throw new \LogicException(sprintf('Impossible de trouver le bloc "%s"', $bloc_name)); + } + } + + /** + * @Given /^l\'apéritif du "([^"]*)" à "([^"]*)" est visible$/ + */ + public function lAperitifDuAEstVisible($date, $place) + { + if (!$this->getPage('Homepage')->hasDrink($date, $place)) { + throw new \LogicException("Impossible de trouver l'apéritif"); + } + } + + /** + * @Given /^l\'apéritif du "([^"]*)" à "([^"]*)" n\'est pas visible$/ + */ + public function lAperitifDuANEstPasVisible($date, $place) + { + if ($this->getPage('Homepage')->hasDrink($date, $place)) { + throw new \LogicException("L'apéritif est affiché sur la page"); + } + } + + /** + * @Given /^il est possible de créer un apéro$/ + */ + public function ilEstPossibleDeCreerUnApero() + { + if (!$this->getPage('Homepage')->hasAction('Les apéros PHP', 'Organiser un apéro »')) { + throw new \LogicException('Le lien de création d\'un apéro n\'est pas disponible'); + } + } +} diff --git a/tests/functional/bootstrap/Context/SigninContext.php b/tests/functional/bootstrap/Context/SigninContext.php new file mode 100644 index 0000000..c0ef778 --- /dev/null +++ b/tests/functional/bootstrap/Context/SigninContext.php @@ -0,0 +1,36 @@ +getPage('Signin')->open(); + } + + /** + * @Given /^la page de connexion s\'affiche correctement$/ + */ + public function laPageDeConnexionSAfficheCorrectement() + { + return array( + new Step\Then(sprintf('la page "%s" s\'affiche correctement', $this->getPage('Signin')->path)), + ); + } + + /** + * @Given /^je me connecte avec les identifiants "([^"]*)"\/"([^"]*)"$/ + */ + public function jeMeConnecteAvecLesIdentifiants($login, $password) + { + + } +} diff --git a/tests/functional/bootstrap/Context/SignupContext.php b/tests/functional/bootstrap/Context/SignupContext.php new file mode 100644 index 0000000..b6fd7a1 --- /dev/null +++ b/tests/functional/bootstrap/Context/SignupContext.php @@ -0,0 +1,36 @@ +getPage('Signup')->open(); + } + + /** + * @Given /^la page d\'inscription s\'affiche correctement$/ + */ + public function laPageDInscriptionSAfficheCorrectement() + { + return array( + new Step\Then(sprintf('la page "%s" s\'affiche correctement', $this->getPage('Signup')->path)), + ); + } + + /** + * @Given /^je me créé un compte "([^"]*)"\/"([^"]*)"\/"([^"]*)"$/ + */ + public function jeMeCreeUnCompte($login, $password, $email) + { + $this->getPage('Signup')->createAccount($login, $password, $email); + } +} diff --git a/tests/functional/bootstrap/Context/WebContext.php b/tests/functional/bootstrap/Context/WebContext.php new file mode 100644 index 0000000..e88cb7d --- /dev/null +++ b/tests/functional/bootstrap/Context/WebContext.php @@ -0,0 +1,36 @@ +parameters = $parameters; + } + + protected function getMink() + { + return $this->getMainContext()->getSubcontext('mink'); + } + + /** + * @Given /^la page "(?P[^"]*)" s\'affiche correctement$/ + */ + public function laPageSAfficheCorrectement($url) + { + return array( + new Step\Then("je devrais être sur \"$url\""), + new Step\Then("le code de status de la réponse devrait être 200"), + ); + } +} diff --git a/tests/functional/bootstrap/FeatureContext.php b/tests/functional/bootstrap/FeatureContext.php new file mode 100644 index 0000000..e116dcf --- /dev/null +++ b/tests/functional/bootstrap/FeatureContext.php @@ -0,0 +1,45 @@ +useContext('view', new Context\WebContext($parameters)); + $this->useContext('homepage', new Context\HomepageContext($parameters)); + $this->useContext('signup', new Context\SignupContext($parameters)); + $this->useContext('signin', new Context\SigninContext($parameters)); + $this->useContext('mink', new MinkContext($parameters)); + } + + /** + * Reset database for testing on fresh fixtures import + * + * @BeforeFeature + */ + public static function resetDatabase() + { + // Load application to have db connection + $app = require __DIR__.'/../../../app/bootstrap.php'; + require __DIR__.'/../../../app/config_behat.php'; + + // Reseting database + $databaseTool = new DatabaseTool($app['db']); + $databaseTool->createSchema(__DIR__.'/../../../data/sql/schema.mysql.sql'); + $databaseTool->loadFixtures(__DIR__.'/../../../data/sql/fixtures.sql'); + } +} diff --git a/tests/functional/bootstrap/Page/Element/Menu.php b/tests/functional/bootstrap/Page/Element/Menu.php new file mode 100644 index 0000000..498e1f4 --- /dev/null +++ b/tests/functional/bootstrap/Page/Element/Menu.php @@ -0,0 +1,56 @@ + 'ul.mainnav'); + + /** + * Return an array of links in the menu + * + * @return array + */ + public function getLinks() + { + return $this->findAll('css', 'li a'); + } + + /** + * Give the number of links in the menu + * + * @return integer + */ + public function countLinks() + { + return count($this->getLinks()); + } + + /** + * Check if a menu link exist for the given label and given url + * + * @param string $label Link label + * @param string $url Link url + * @return boolean + */ + public function isLinkExists($label, $url) + { + foreach ($this->getLinks() as $link) { + if ($label == $link->getText() && strstr($link->getAttribute('href'), $url)) { + return true; + } + } + + return false; + } +} diff --git a/tests/functional/bootstrap/Page/Homepage.php b/tests/functional/bootstrap/Page/Homepage.php new file mode 100644 index 0000000..4dc7119 --- /dev/null +++ b/tests/functional/bootstrap/Page/Homepage.php @@ -0,0 +1,107 @@ + array('css' => 'div.widgets'), + ); + + /** + * Return all blocks elements on the page + * + * @return array + */ + protected function getAllBlocks() + { + return $this->findall('css', 'div.widget'); + } + + /** + * Return the block defined by its name + * + * @param string $title Block title + * @return Element + */ + public function getBlock($title) + { + foreach ($this->getAllBlocks() as $block) { + if ($block->find('css', '.widget-header')->getText() == $title) { + return $block; + } + } + + return null; + } + + /** + * Check if a block exists with the given title + * + * @param string $title Block title + * @return boolean + */ + public function hasBlock($title) + { + return !is_null($this->getBlock($title)); + } + + /** + * Get all drinks elements on the page + * + * @return array + */ + protected function getAllDrinks() + { + return $this->findAll('css', 'ul.news-items li'); + } + + /** + * Check if a drink for given place and date is displayed on the page + * + * @param string $date + * @param string $place + * @return boolean + */ + public function hasDrink($date, $place) + { + foreach ($this->getAllDrinks() as $drink) { + if (strstr($drink->getText(), $date) && strstr($drink->getText(), $place)) { + return true; + } + } + + return false; + } + + /** + * Check if a link with the given text exists in the given block + * + * @param string $block Block name + * @param string $link_label Link label + * @return boolean + */ + public function hasAction($block, $link_label) + { + $block = $this->getBlock($block); + if ($block) { + $links = $block->findAll('css', 'a'); + foreach ($links as $link) { + if ($link->getText() == $link_label) { + return true; + } + } + } + + return false; + } +} diff --git a/tests/functional/bootstrap/Page/Signin.php b/tests/functional/bootstrap/Page/Signin.php new file mode 100644 index 0000000..aea4937 --- /dev/null +++ b/tests/functional/bootstrap/Page/Signin.php @@ -0,0 +1,15 @@ + array('css' => 'form#signup') + ); + + /** + * Create an account + * + * @param string $username + * @param string $password + * @param string $email + * @param string $firstname + * @param string $lastname + * + * @return void + */ + public function createAccount($username, $password, $email, $firstname=null, $lastname=null) + { + $signupForm = $this->getElement('form'); + + $signupForm->fillField('signup_member_username', $username); + $signupForm->fillField('signup_member_password', $password); + $signupForm->fillField('signup_user_email', $email); + $signupForm->fillField('signup_user_lastname', $lastname); + $signupForm->fillField('signup_user_firstname', $firstname); + + return $signupForm->pressButton('S\'inscrire'); + } +} diff --git a/tests/units/Aperophp/Provider/Controller/Comment.php b/tests/units/Aperophp/Provider/Controller/Comment.php index 5a1ba2e..fda209b 100644 --- a/tests/units/Aperophp/Provider/Controller/Comment.php +++ b/tests/units/Aperophp/Provider/Controller/Comment.php @@ -33,6 +33,7 @@ public function testCommentDrinkWithUnanonymousUser() ->if($form = $crawler->selectButton('comment')->form()) ->and($crawler = $client->submit($form, $this->getDefaultDatas())) ->then() + ->dump($client->getResponse()->getContent()) ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() ->if($crawler = $client->followRedirect()) ->then() diff --git a/tests/units/Aperophp/Provider/Controller/Drink.php b/tests/units/Aperophp/Provider/Controller/Drink.php deleted file mode 100644 index c6dcf84..0000000 --- a/tests/units/Aperophp/Provider/Controller/Drink.php +++ /dev/null @@ -1,226 +0,0 @@ - '', - 'drink[hour]' => '19:30:00', - 'drink[description]' => 'ApéroPHP au père tranquille.', - 'drink[city_id]' => '5', - 'drink[kind]' => 'drink', - 'drink[place]' => 'Au père tranquille', - 'drink[address]' => '16 Rue Pierre Lescot, Paris, France', - 'drink[latitude]' => '48.86214', - 'drink[longitude]' => '2.34843', - 'drink[day]' => '2016-07-19', - ), - $data_overload - ); - } - - public function testDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ; - } - - public function testNewDrink_withNoCaptcha_isNotCreated() - { - $this->assert - ->if($client = $this->createClient()) - ->and(true === $client->connect()) - ->and($crawler = $client->request('GET', '/new.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('create')->form()) - ->and($crawler = $client->submit($form, $this->getDefaultDatas(array('drink[captcha]' => 'DO NOT FEED')))) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ; - } - - public function testNewDrink_withValidData_isCreated() - { - $this->assert - ->if($client = $this->createClient()) - ->and(true === $client->connect()) - ->and($crawler = $client->request('GET', '/new.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('create')->form()) - ->and($crawler = $client->submit($form, $this->getDefaultDatas())) - ->then() - ->boolean($client->getResponse()->isRedirect())->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer(preg_match('#^/(\d+)/view\.html$#', $client->getRequest()->getRequestUri()))->isEqualTo(1) - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ; - } - - public function testNewDrink_withAnonymousUser_isRedirectedToLoginform() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/new.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withValidData_isUpdated() - { - $this->assert - ->if($client = $this->createClient()) - ->and(true == $client->connect()) - ->and($crawler = $client->request('GET', '/1/edit.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('update')->form()) - ->then() - ->if($crawler = $client->submit($form, $this->getDefaultDatas(array( - 'drink[hour]' => '20:00:00', - 'drink[description]' => 'ApéroPHP au père tranquille [Edited].', - 'drink[kind]' => 'talk', - 'drink[day]' => '2016-07-20', - )))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->integer($crawler->filter('p:contains("[Edited]")')->count())->isEqualTo(1) - ->integer($crawler->filter('h1:contains("Mini-conf")')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withBadData_isUpdated() - { - $this->assert - ->if($client = $this->createClient()) - ->and(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/1/edit.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('update')->form()) - ->then() - ->if($crawler = $client->submit($form, $this->getDefaultDatas(array( - 'drink[captcha]' => '', - 'drink[hour]' => '00:00:00', - 'drink[description]' => '', - 'drink[place]' => '', - 'drink[address]' => '', - 'drink[latitude]' => '', - 'drink[longitude]' => '', - 'drink[day]' => '', - )))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/edit.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withAnonymousUser_isRedirectedToLoginForm() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/1/edit.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withWrongUser_isRedirectedToLoginForm() - { - $this->assert - ->if($client = $this->createClient()) - ->and(true == $client->connect('user2', 'password')) - ->and($crawler = $client->request('GET', '/1/edit.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withOldDrink_isRedirectedToDrinkView() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/2/edit.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/2/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditDrink_withUnknowDrink_isRedirectedTo404() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/1456/edit.html')) - ->then() - ->boolean($client->getResponse()->isNotFound())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDrinkList() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/list.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ; - } - - public function testViewDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/1/view.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ; - } - - public function testViewUnexistentDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->and($crawler = $client->request('GET', '/987/view.html')) - ->then() - ->boolean($client->getResponse()->isNotFound())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } -} diff --git a/tests/units/Aperophp/Provider/Controller/Member.php b/tests/units/Aperophp/Provider/Controller/Member.php deleted file mode 100644 index bead9fd..0000000 --- a/tests/units/Aperophp/Provider/Controller/Member.php +++ /dev/null @@ -1,400 +0,0 @@ -assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/signup.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('register')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'signup[user][lastname]' => 'Foo', - 'signup[user][firstname]' => 'Bar', - 'signup[member][username]' => 'foobar', - 'signup[user][email]' => 'foobar@example.com', - 'signup[member][password]' => 'foobar', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ; - } - - public function testSignup_withIncorrectData_formIsDisplayedWithErrors() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/signup.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('register')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'signup[user][lastname]' => '', - 'signup[user][firstname]' => '', - 'signup[member][username]' => '', - 'signup[user][email]' => 'foobar', - 'signup[member][password]' => 'f', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect())->isFalse() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ->integer($crawler->filter('span.help-inline')->count())->isEqualTo(3) - ; - } - - public function testSignup_connected() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/signup.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditProfile_withValidData_isModified() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/edit.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('edit')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_edit[user][lastname]' => 'Foo', - 'member_edit[user][firstname]' => 'Bar', - 'member_edit[user][email]' => 'foobar@example.com', - 'member_edit[member][password]' => '', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/edit.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ; - } - - public function testEditProfile_withInvalidData_isNotModified() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/edit.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('edit')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_edit[user][lastname]' => '', - 'member_edit[user][firstname]' => '', - 'member_edit[user][email]' => '', - 'member_edit[member][password]' => '', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/edit.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditProfile_withAnonymousUser_isRedirectedToLoginform() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/edit.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testSignin_badPassword() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/signin.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('login')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'signin[username]' => 'user2', - 'signin[password]' => 'badpassword', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect())->isFalse() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testSignin_connected() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/signin.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_goodMail() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_forget[email]' => 'user3@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->boolean(true == $client->connect())->isTrue() - ; - } - - public function testForget_badMail() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_forget[email]' => 'user42@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/forget.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_user() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_forget[email]' => 'user2@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/forget.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_connected() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/forget.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_noData() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'member_forget[email]' => '', - ))) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testRemember_goodData() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/remember.html/user3@example.org/token')) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ; - } - - public function testRemember_badToken() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/remember.html/user3@example.org/token42')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testRemember_badEmail() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/remember.html/user42@example.org/token')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testRemember_anonymous() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/remember.html/user2@example.org/token')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testRemember_connected() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/member/remember.html/user@example.org/token')) - ->then() - ->boolean($client->getResponse()->isRedirect('/'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testSignup_withExistingEmail_areParticipationsChanged() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/member/signup.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('register')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'signup[user][lastname]' => 'Foo', - 'signup[user][firstname]' => 'Bar', - 'signup[member][username]' => 'marvin', - 'signup[user][email]' => 'user4@example.org', - 'signup[member][password]' => 'user4', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/member/signin.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->if(true === $client->connect('marvin', 'user4')) - ->then - ->if($crawler = $client->request('GET', '/1/view.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('td.vleft:contains("marvin")')->count())->isEqualTo(1) - ->integer($crawler->filter('small:contains("marvin")')->count())->isEqualTo(1) - ; - } -} diff --git a/tests/units/Aperophp/Provider/Controller/Participate.php b/tests/units/Aperophp/Provider/Controller/Participate.php deleted file mode 100644 index 467d1e7..0000000 --- a/tests/units/Aperophp/Provider/Controller/Participate.php +++ /dev/null @@ -1,391 +0,0 @@ -assert - ->if($client = $this->createClient()) - ->then - ->if(true === $client->connect()) - ->then - ->if($crawler = $client->request('GET', '/1/view.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(1) - ->if($form = $crawler->selectButton('participate')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'drink_participate[percentage]' => '30', - 'drink_participate[reminder]' => true, - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(1) - // Now, I participate to the drink. - // CHeck if all fields have been prefilled - ->string($crawler->filter('select#drink_participate_percentage option[selected=selected]')->first()->attr('value'))->isEqualTo('30') - ->string($crawler->filter('input#drink_participate_reminder')->first()->attr('value'))->isEqualTo(1) - // Submit the form again to modified participation - ->if($crawler = $client->submit($form, array( - 'drink_participate[percentage]' => '70', - 'drink_participate[reminder]' => true, - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->string($crawler->filter('select#drink_participate_percentage option[selected=selected]')->first()->attr('value'))->isEqualTo('70') - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(1) - // Delete an existing participation - ->if($crawler = $client->request('GET', '/participation/1/delete.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("S\'inscrire")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Jeton perdu ?")')->count())->isEqualTo(0) - // Delete a non-existing participation - ->if($crawler = $client->request('GET', '/participation/1/delete.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testEditParticipationToADrink_withUnanonymousUser_participationSaved() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/1/view.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.participation a.btn:contains("S\'inscrire")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Jeton perdu ?")')->count())->isEqualTo(1) - ->if($form = $crawler->selectButton('participate')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'drink_participate[user][firstname]' => 'Foo', - 'drink_participate[user][lastname]' => 'Bar', - 'drink_participate[user][email]' => 'foobar@example.org', - 'drink_participate[percentage]' => '30', - 'drink_participate[reminder]' => true, - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - // Now, I participate to the drink. - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(1) - // CHeck if all fields have been prefilled - ->string($crawler->filter('input#drink_participate_user_firstname')->first()->attr('value'))->isEqualTo('Foo') - ->string($crawler->filter('input#drink_participate_user_lastname')->first()->attr('value'))->isEqualTo('Bar') - ->string($crawler->filter('input#drink_participate_user_email')->first()->attr('value'))->isEqualTo('foobar@example.org') - ->string($crawler->filter('select#drink_participate_percentage option[selected=selected]')->first()->attr('value'))->isEqualTo('30') - ->string($crawler->filter('input#drink_participate_reminder')->first()->attr('value'))->isEqualTo(1) - // Submit the form again to modified participation - ->if($crawler = $client->submit($form, array( - 'drink_participate[user][firstname]' => 'Foo', - 'drink_participate[user][lastname]' => 'Bar', - 'drink_participate[user][email]' => 'foobar@example.org', - 'drink_participate[percentage]' => '70', - 'drink_participate[reminder]' => true, - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->string($crawler->filter('select#drink_participate_percentage option[selected=selected]')->first()->attr('value'))->isEqualTo('70') - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(1) - // Delete an existing participation - ->if($crawler = $client->request('GET', '/participation/1/delete.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.participation a.btn:contains("Modifier")')->count())->isEqualTo(0) - ->integer($crawler->filter('div.participation a.btn:contains("Se désinscrire")')->count())->isEqualTo(0) - ->integer($crawler->filter('div.participation a.btn:contains("S\'inscrire")')->count())->isEqualTo(1) - ->integer($crawler->filter('div.participation a.btn:contains("Jeton perdu ?")')->count())->isEqualTo(0) - // Delete a non-existing participation - ->if($crawler = $client->request('GET', '/participation/1/delete.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - - } - - public function testDelete_withUnknowDrink_isRedirectedTo404() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/42/delete.html')) - ->then() - ->boolean($client->getResponse()->isNotFound())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withFinishedDrink_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/2/delete.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/2/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withNoUser_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/2/delete.html/marvin/42')) - ->then() - ->boolean($client->getResponse()->isRedirect('/2/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withUnknownUser_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/delete.html/marvin/42')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withNoUserToken_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/delete.html/user1@example.org')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withBadUserToken_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/delete.html/user1@example.org/42')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testParticipateToADrink_withUnanonymousUser_badData() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/1/view.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('participate')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'drink_participate[user][firstname]' => '', - 'drink_participate[user][lastname]' => '', - 'drink_participate[user][email]' => '', - 'drink_participate[percentage]' => 0, - 'drink_participate[reminder]' => true, - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testDelete_withGoodUserToken_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/delete.html/user1@example.org/token')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ; - } - - public function testForget_goodMail() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'participation_forget[email]' => 'user3@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-success')->count())->isEqualTo(1) - ->boolean(true == $client->connect())->isTrue() - ; - } - - public function testForget_badMail() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'participation_forget[email]' => 'user42@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/participation/1/forget.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_user() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'participation_forget[email]' => 'user2@example.org', - ))) - ->then() - ->boolean($client->getResponse()->isRedirect('/participation/1/forget.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_connected() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if(true == $client->connect()) - ->then() - ->if($crawler = $client->request('GET', '/participation/1/forget.html')) - ->then() - ->boolean($client->getResponse()->isRedirect('/1/view.html'))->isTrue() - ->if($crawler = $client->followRedirect()) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_withunknownDrink_isRedirectedToDrink() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/42/forget.html')) - ->then() - ->boolean($client->getResponse()->isNotFound())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } - - public function testForget_noData() - { - $this->assert - ->if($client = $this->createClient()) - ->then - ->if($crawler = $client->request('GET', '/participation/1/forget.html')) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->if($form = $crawler->selectButton('remember')->form()) - ->then() - ->if($crawler = $client->submit($form, array( - 'participation_forget[email]' => '', - ))) - ->then() - ->boolean($client->getResponse()->isOk())->isTrue() - ->integer($crawler->filter('div.alert-error')->count())->isEqualTo(1) - ; - } -} diff --git a/tests/units/bootstrap.php b/tests/units/bootstrap.php index 1a08a88..177b70e 100644 --- a/tests/units/bootstrap.php +++ b/tests/units/bootstrap.php @@ -1,3 +1,4 @@ label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-right: 10px; - padding-left: 10px; - } - .modal { - position: absolute; - top: 10px; - right: 10px; - left: 10px; - width: auto; - margin: 0; - } - .modal.fade.in { - top: auto; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} - -@media (max-width: 767px) { - body { - padding-right: 20px; - padding-left: 20px; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - margin-right: -20px; - margin-left: -20px; - } - .container-fluid { - padding: 0; - } - .dl-horizontal dt { - float: none; - width: auto; - clear: none; - text-align: left; - } - .dl-horizontal dd { - margin-left: 0; - } - .container { - width: auto; - } - .row-fluid { - width: 100%; - } - .row, - .thumbnails { - margin-left: 0; - } - [class*="span"], - .row-fluid [class*="span"] { - display: block; - float: none; - width: auto; - margin-left: 0; - } - .input-large, - .input-xlarge, - .input-xxlarge, - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - min-height: 28px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .input-prepend input, - .input-append input, - .input-prepend input[class*="span"], - .input-append input[class*="span"] { - display: inline-block; - width: auto; - } -} - -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 20px; - } - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 724px; - } - .span12 { - width: 724px; - } - .span11 { - width: 662px; - } - .span10 { - width: 600px; - } - .span9 { - width: 538px; - } - .span8 { - width: 476px; - } - .span7 { - width: 414px; - } - .span6 { - width: 352px; - } - .span5 { - width: 290px; - } - .span4 { - width: 228px; - } - .span3 { - width: 166px; - } - .span2 { - width: 104px; - } - .span1 { - width: 42px; - } - .offset12 { - margin-left: 764px; - } - .offset11 { - margin-left: 702px; - } - .offset10 { - margin-left: 640px; - } - .offset9 { - margin-left: 578px; - } - .offset8 { - margin-left: 516px; - } - .offset7 { - margin-left: 454px; - } - .offset6 { - margin-left: 392px; - } - .offset5 { - margin-left: 330px; - } - .offset4 { - margin-left: 268px; - } - .offset3 { - margin-left: 206px; - } - .offset2 { - margin-left: 144px; - } - .offset1 { - margin-left: 82px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 28px; - margin-left: 2.762430939%; - *margin-left: 2.709239449638298%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span12 { - width: 99.999999993%; - *width: 99.9468085036383%; - } - .row-fluid .span11 { - width: 91.436464082%; - *width: 91.38327259263829%; - } - .row-fluid .span10 { - width: 82.87292817100001%; - *width: 82.8197366816383%; - } - .row-fluid .span9 { - width: 74.30939226%; - *width: 74.25620077063829%; - } - .row-fluid .span8 { - width: 65.74585634900001%; - *width: 65.6926648596383%; - } - .row-fluid .span7 { - width: 57.182320438000005%; - *width: 57.129128948638304%; - } - .row-fluid .span6 { - width: 48.618784527%; - *width: 48.5655930376383%; - } - .row-fluid .span5 { - width: 40.055248616%; - *width: 40.0020571266383%; - } - .row-fluid .span4 { - width: 31.491712705%; - *width: 31.4385212156383%; - } - .row-fluid .span3 { - width: 22.928176794%; - *width: 22.874985304638297%; - } - .row-fluid .span2 { - width: 14.364640883%; - *width: 14.311449393638298%; - } - .row-fluid .span1 { - width: 5.801104972%; - *width: 5.747913482638298%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 714px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 652px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 590px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 528px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 466px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 404px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 342px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 280px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 218px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 156px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 94px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 32px; - } -} - -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 30px; - } - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; - } - .span12 { - width: 1170px; - } - .span11 { - width: 1070px; - } - .span10 { - width: 970px; - } - .span9 { - width: 870px; - } - .span8 { - width: 770px; - } - .span7 { - width: 670px; - } - .span6 { - width: 570px; - } - .span5 { - width: 470px; - } - .span4 { - width: 370px; - } - .span3 { - width: 270px; - } - .span2 { - width: 170px; - } - .span1 { - width: 70px; - } - .offset12 { - margin-left: 1230px; - } - .offset11 { - margin-left: 1130px; - } - .offset10 { - margin-left: 1030px; - } - .offset9 { - margin-left: 930px; - } - .offset8 { - margin-left: 830px; - } - .offset7 { - margin-left: 730px; - } - .offset6 { - margin-left: 630px; - } - .offset5 { - margin-left: 530px; - } - .offset4 { - margin-left: 430px; - } - .offset3 { - margin-left: 330px; - } - .offset2 { - margin-left: 230px; - } - .offset1 { - margin-left: 130px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 28px; - margin-left: 2.564102564%; - *margin-left: 2.510911074638298%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.45299145300001%; - *width: 91.3997999636383%; - } - .row-fluid .span10 { - width: 82.905982906%; - *width: 82.8527914166383%; - } - .row-fluid .span9 { - width: 74.358974359%; - *width: 74.30578286963829%; - } - .row-fluid .span8 { - width: 65.81196581200001%; - *width: 65.7587743226383%; - } - .row-fluid .span7 { - width: 57.264957265%; - *width: 57.2117657756383%; - } - .row-fluid .span6 { - width: 48.717948718%; - *width: 48.6647572286383%; - } - .row-fluid .span5 { - width: 40.170940171000005%; - *width: 40.117748681638304%; - } - .row-fluid .span4 { - width: 31.623931624%; - *width: 31.5707401346383%; - } - .row-fluid .span3 { - width: 23.076923077%; - *width: 23.0237315876383%; - } - .row-fluid .span2 { - width: 14.529914530000001%; - *width: 14.4767230406383%; - } - .row-fluid .span1 { - width: 5.982905983%; - *width: 5.929714493638298%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 1160px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 1060px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 960px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 860px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 760px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 660px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 560px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 460px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 360px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 260px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 160px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 60px; - } - .thumbnails { - margin-left: -30px; - } - .thumbnails > li { - margin-left: 30px; - } - .row-fluid .thumbnails { - margin-left: 0; - } -} - -@media (max-width: 979px) { - body { - padding-top: 0; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - position: static; - } - .navbar-fixed-top { - margin-bottom: 18px; - } - .navbar-fixed-bottom { - margin-top: 18px; - } - .navbar-fixed-top .navbar-inner, - .navbar-fixed-bottom .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-right: 10px; - padding-left: 10px; - margin: 0 0 0 -5px; - } - .nav-collapse { - clear: both; - } - .nav-collapse .nav { - float: none; - margin: 0 0 9px; - } - .nav-collapse .nav > li { - float: none; - } - .nav-collapse .nav > li > a { - margin-bottom: 2px; - } - .nav-collapse .nav > .divider-vertical { - display: none; - } - .nav-collapse .nav .nav-header { - color: #999999; - text-shadow: none; - } - .nav-collapse .nav > li > a, - .nav-collapse .dropdown-menu a { - padding: 6px 15px; - font-weight: bold; - color: #999999; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .nav-collapse .btn { - padding: 4px 10px 4px; - font-weight: normal; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - .nav-collapse .dropdown-menu li + li a { - margin-bottom: 2px; - } - .nav-collapse .nav > li > a:hover, - .nav-collapse .dropdown-menu a:hover { - background-color: #222222; - } - .nav-collapse.in .btn-group { - padding: 0; - margin-top: 5px; - } - .nav-collapse .dropdown-menu { - position: static; - top: auto; - left: auto; - display: block; - float: none; - max-width: none; - padding: 0; - margin: 0 15px; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .nav-collapse .dropdown-menu:before, - .nav-collapse .dropdown-menu:after { - display: none; - } - .nav-collapse .dropdown-menu .divider { - display: none; - } - .nav-collapse .navbar-form, - .nav-collapse .navbar-search { - float: none; - padding: 9px 15px; - margin: 9px 0; - border-top: 1px solid #222222; - border-bottom: 1px solid #222222; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - } - .navbar .nav-collapse .nav.pull-right { - float: none; - margin-left: 0; - } - .nav-collapse, - .nav-collapse.collapse { - height: 0; - overflow: hidden; - } - .navbar .btn-navbar { - display: block; - } - .navbar-static .navbar-inner { - padding-right: 10px; - padding-left: 10px; - } -} - -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -} - -@media (max-width: 767px) { - #main { - padding: 0 10px; - margin-right: -20px; - margin-left: -20px; - } - .subnavbar { - margin-right: -20px; - margin-left: -20px; - } - .subnavbar-inner { - height: auto; - } - .subnavbar .container > ul { - width: 100%; - height: auto; - border: none; - } - .subnavbar .container > ul > li { - width: 33%; - height: 70px; - margin-bottom: 0; - border: none; - } - .subnavbar .container > ul > li.active > a { - font-size: 11px; - background: transparent; - } - .subnavbar .container > ul > li > a > i { - display: inline-block; - margin-bottom: 0; - font-size: 20px; - } -} - -@media (max-width: 979px) { - .navbar-fixed-top { - position: static; - margin-bottom: 0; - } - .subnavbar .container { - width: auto; - } -} diff --git a/web/css/bootstrap-responsive.min.css b/web/css/bootstrap-responsive.min.css index 6539b65..e69de29 100644 --- a/web/css/bootstrap-responsive.min.css +++ b/web/css/bootstrap-responsive.min.css @@ -1,9 +0,0 @@ -/*! - * Bootstrap Responsive v2.0.4 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}@media(max-width:767px){.visible-phone{display:inherit!important}.hidden-phone{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(min-width:768px) and (max-width:979px){.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:18px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:18px}.navbar-fixed-bottom{margin-top:18px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}@media(max-width:767px){#main{padding:0 10px;margin-right:-20px;margin-left:-20px}.subnavbar{margin-right:-20px;margin-left:-20px}.subnavbar-inner{height:auto}.subnavbar .container>ul{width:100%;height:auto;border:0}.subnavbar .container>ul>li{width:33%;height:70px;margin-bottom:0;border:0}.subnavbar .container>ul>li.active>a{font-size:11px;background:transparent}.subnavbar .container>ul>li>a>i{display:inline-block;margin-bottom:0;font-size:20px}}@media(max-width:979px){.navbar-fixed-top{position:static;margin-bottom:0}.subnavbar .container{width:auto}} diff --git a/web/index.php b/web/index.php index 796734d..f2de07d 100644 --- a/web/index.php +++ b/web/index.php @@ -1,4 +1,4 @@ run(); \ No newline at end of file +$app->run(); diff --git a/web/index_behat.php b/web/index_behat.php new file mode 100644 index 0000000..00b5860 --- /dev/null +++ b/web/index_behat.php @@ -0,0 +1,5 @@ +run();