Skip to content

Commit

Permalink
Moved Silex service provider into League\StatsD namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
marcqualie committed Aug 26, 2013
1 parent 2984090 commit a6cae3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
},
"autoload": {
"psr-0": {
"League": ["src", "tests"],
"Silex\\Provider": "src"
"League": [
"src",
"tests"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Silex\Provider;
namespace League\StatsD\Provider\Silex;

use Silex\Application;
use Silex\ServiceProviderInterface;
Expand Down
10 changes: 6 additions & 4 deletions tests/League/StatsD/Test/SilexProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace League\StatsD\Test;
use Silex\Application;
use League\StatsD\Provider\Silex\StatsdServiceProvider;
use League\StatsD\Client;

class SilexProviderTest extends TestCase
Expand All @@ -9,8 +11,8 @@ class SilexProviderTest extends TestCase
public function testProvider()
{

$app = new \Silex\Application();
$app->register(new \Silex\Provider\StatsdServiceProvider(), array(
$app = new Application();
$app->register(new StatsdServiceProvider(), array(
'statsd.host' => 'localhost',
'statsd.port' => 7890,
'statsd.namespace' => 'test_namespace'
Expand All @@ -34,8 +36,8 @@ public function testProvider()
public function testProviderDefaults()
{

$app = new \Silex\Application();
$app->register(new \Silex\Provider\StatsdServiceProvider());
$app = new Application();
$app->register(new StatsdServiceProvider());

// Make sure configuration is sorted
$this->assertEquals('127.0.0.1', $app['statsd']->getHost());
Expand Down

0 comments on commit a6cae3b

Please sign in to comment.