Commit 3a5d992c authored by Igor Wiedler's avatar Igor Wiedler

Replace individual test suite component checks with global one

parent 3563829a
......@@ -23,13 +23,6 @@ use Silex\Provider\FormServiceProvider;
*/
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()
{
$this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form());
......
......@@ -25,13 +25,6 @@ use Monolog\Logger;
*/
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()
{
$app = $this->createApplication();
......
......@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
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()
{
$request = Request::create('/');
......
......@@ -23,13 +23,6 @@ use Silex\Provider\SwiftmailerServiceProvider;
*/
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()
{
$app = $this->createApplication();
......
......@@ -23,13 +23,6 @@ use Silex\Provider\TranslationServiceProvider;
*/
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()
{
$app = $this->createApplication();
......
......@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
*/
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()
{
$app = $this->createApplication();
......
......@@ -21,13 +21,6 @@ use Silex\Provider\DoctrineServiceProvider;
*/
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()
{
$app = new Application();
......
......@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
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()
{
$app = $this->getApplication();
......
......@@ -25,13 +25,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
class SecurityServiceProviderTest extends WebTestCase
{
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/symfony/security')) {
$this->markTestSkipped('Security dependency was not installed.');
}
}
/**
* @expectedException \LogicException
*/
......
......@@ -19,13 +19,6 @@ use Symfony\Component\HttpFoundation\Response;
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()
{
$app = new Application();
......
......@@ -23,13 +23,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
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()
{
$app = new Application();
......
......@@ -23,13 +23,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*/
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()
{
$app = new Application();
......@@ -53,10 +46,6 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
*/
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 FormServiceProvider());
......
......@@ -24,13 +24,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
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()
{
$app = new Application();
......
......@@ -2,3 +2,9 @@
$loader = require __DIR__.'/../vendor/autoload.php';
$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