Commit c2ac686e authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/vendor-check (PR #626)

This PR was merged into the master branch.

Commits
-------

3a5d992c Replace individual test suite component checks with global one

Discussion
----------

Replace individual test suite component checks with global one

---------------------------------------------------------------------------

by davedevelopment at 2013-02-09T19:43:06Z

👍 nice to see code disappearing
parents 3563829a 3a5d992c
...@@ -23,13 +23,6 @@ use Silex\Provider\FormServiceProvider; ...@@ -23,13 +23,6 @@ use Silex\Provider\FormServiceProvider;
*/ */
class FormTraitTest extends \PHPUnit_Framework_TestCase class FormTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/form')) {
$this->markTestSkipped('Form dependency was not installed.');
}
}
public function testForm() public function testForm()
{ {
$this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form()); $this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form());
......
...@@ -25,13 +25,6 @@ use Monolog\Logger; ...@@ -25,13 +25,6 @@ use Monolog\Logger;
*/ */
class MonologTraitTest extends \PHPUnit_Framework_TestCase class MonologTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/monolog/monolog/src')) {
$this->markTestSkipped('Monolog dependency was not installed.');
}
}
public function testLog() public function testLog()
{ {
$app = $this->createApplication(); $app = $this->createApplication();
......
...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class SecurityTraitTest extends \PHPUnit_Framework_TestCase class SecurityTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/security')) {
$this->markTestSkipped('Security dependency was not installed.');
}
}
public function testUser() public function testUser()
{ {
$request = Request::create('/'); $request = Request::create('/');
......
...@@ -23,13 +23,6 @@ use Silex\Provider\SwiftmailerServiceProvider; ...@@ -23,13 +23,6 @@ use Silex\Provider\SwiftmailerServiceProvider;
*/ */
class SwiftmailerTraitTest extends \PHPUnit_Framework_TestCase class SwiftmailerTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/swiftmailer/swiftmailer')) {
$this->markTestSkipped('Swiftmailer dependency was not installed.');
}
}
public function testMail() public function testMail()
{ {
$app = $this->createApplication(); $app = $this->createApplication();
......
...@@ -23,13 +23,6 @@ use Silex\Provider\TranslationServiceProvider; ...@@ -23,13 +23,6 @@ use Silex\Provider\TranslationServiceProvider;
*/ */
class TranslationTraitTest extends \PHPUnit_Framework_TestCase class TranslationTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/translation')) {
$this->markTestSkipped('Translation dependency was not installed.');
}
}
public function testTrans() public function testTrans()
{ {
$app = $this->createApplication(); $app = $this->createApplication();
......
...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse; ...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
*/ */
class TwigTraitTest extends \PHPUnit_Framework_TestCase class TwigTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/twig/twig')) {
$this->markTestSkipped('Twig dependency was not installed.');
}
}
public function testRender() public function testRender()
{ {
$app = $this->createApplication(); $app = $this->createApplication();
......
...@@ -21,13 +21,6 @@ use Silex\Provider\DoctrineServiceProvider; ...@@ -21,13 +21,6 @@ use Silex\Provider\DoctrineServiceProvider;
*/ */
class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/doctrine/common/lib') || !is_dir(__DIR__.'/../../../../vendor/doctrine/dbal/lib')) {
$this->markTestSkipped('Doctrine Common/DBAL dependencies were not installed.');
}
}
public function testOptionsInitializer() public function testOptionsInitializer()
{ {
$app = new Application(); $app = new Application();
......
...@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/monolog/monolog/src')) {
$this->markTestSkipped('Monolog dependency was not installed.');
}
}
public function testRequestLogging() public function testRequestLogging()
{ {
$app = $this->getApplication(); $app = $this->getApplication();
......
...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class SecurityServiceProviderTest extends WebTestCase class SecurityServiceProviderTest extends WebTestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/security')) {
$this->markTestSkipped('Security dependency was not installed.');
}
}
/** /**
* @expectedException \LogicException * @expectedException \LogicException
*/ */
......
...@@ -19,13 +19,6 @@ use Symfony\Component\HttpFoundation\Response; ...@@ -19,13 +19,6 @@ use Symfony\Component\HttpFoundation\Response;
class SwiftmailerServiceProviderTest extends \PHPUnit_Framework_TestCase class SwiftmailerServiceProviderTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/swiftmailer/swiftmailer/lib')) {
$this->markTestSkipped('Swiftmailer dependency was not installed.');
}
}
public function testSwiftMailerServiceIsSwiftMailer() public function testSwiftMailerServiceIsSwiftMailer()
{ {
$app = new Application(); $app = new Application();
......
...@@ -23,13 +23,6 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -23,13 +23,6 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/twig/twig/lib')) {
$this->markTestSkipped('Twig dependency was not installed.');
}
}
public function testRegisterAndRender() public function testRegisterAndRender()
{ {
$app = new Application(); $app = new Application();
......
...@@ -23,13 +23,6 @@ use Symfony\Component\Validator\Constraints as Assert; ...@@ -23,13 +23,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*/ */
class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/validator')) {
$this->markTestSkipped('Validator dependency was not installed.');
}
}
public function testRegister() public function testRegister()
{ {
$app = new Application(); $app = new Application();
...@@ -53,10 +46,6 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase ...@@ -53,10 +46,6 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
*/ */
public function testValidatorConstraint($email, $isValid, $nbGlobalError, $nbEmailError, $app) public function testValidatorConstraint($email, $isValid, $nbGlobalError, $nbEmailError, $app)
{ {
if (!is_dir(__DIR__ . '/../../../../vendor/symfony/form')) {
$this->markTestSkipped('Form component was not installed.');
}
$app->register(new ValidatorServiceProvider()); $app->register(new ValidatorServiceProvider());
$app->register(new FormServiceProvider()); $app->register(new FormServiceProvider());
......
...@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request;
*/ */
class SecurityTraitTest extends \PHPUnit_Framework_TestCase class SecurityTraitTest extends \PHPUnit_Framework_TestCase
{ {
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/security')) {
$this->markTestSkipped('Security dependency was not installed.');
}
}
public function testSecure() public function testSecure()
{ {
$app = new Application(); $app = new Application();
......
...@@ -2,3 +2,9 @@ ...@@ -2,3 +2,9 @@
$loader = require __DIR__.'/../vendor/autoload.php'; $loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('Silex\Tests', __DIR__); $loader->add('Silex\Tests', __DIR__);
if (!class_exists('Symfony\Component\Form\Form')) {
echo "You must install the dev dependencies using:\n";
echo " composer install --dev\n";
exit(1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment