Commit 5d599be3 authored by Ricard Clau's avatar Ricard Clau

add test for SwiftmailerServiceProvider and update composer.json require-dev section

parent 55c9c06b
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
"symfony/twig-bridge": "2.1.*", "symfony/twig-bridge": "2.1.*",
"symfony/validator": "2.1.*", "symfony/validator": "2.1.*",
"twig/twig": ">=1.2.0", "twig/twig": ">=1.2.0",
"doctrine/dbal": "2.1.*" "doctrine/dbal": "2.1.*",
"swiftmailer/swiftmailer": "4.1.*"
}, },
"autoload": { "autoload": {
"psr-0": { "Silex": "src/" } "psr-0": { "Silex": "src/" }
......
<?php
/*
* This file is part of the Silex framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\SwiftmailerServiceProvider;
class SwiftmailerServiceProviderTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!is_dir(__DIR__.'/../../../../vendor/swiftmailer/swiftmailer/lib')) {
$this->markTestSkipped('Swiftmailer submodule was not installed.');
}
}
public function testSwiftMailerServiceIsSwiftMailer()
{
$app = new Application();
$app->register(new SwiftmailerServiceProvider(), array(
'swiftmailer.class_path' => __DIR__.'/../../../../vendor/swiftmailer/swiftmailer/lib/classes',
));
$this->assertInstanceOf('Swift_Mailer', $app['mailer']);
}
}
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