File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1717
1818namespace OpenCloud \Tests ;
1919
20+ use OpenCloud \Tests \MockLogger ;
21+
2022class RackspaceTest extends OpenCloudTestCase
2123{
2224 const CREDENTIALS = <<<EOT
@@ -30,10 +32,18 @@ public function test_Credentials()
3032
3133 public function test_Factory_Methods ()
3234 {
35+ // Inject mock logger
36+ $ oldLogger = $ this ->getClient ()->getLogger ();
37+ $ this ->getClient ()->setLogger (new MockLogger ());
38+
3339 $ this ->assertInstanceOf (
3440 'OpenCloud\Database\Service ' ,
3541 $ this ->getClient ()->databaseService ('cloudDatabases ' , 'DFW ' )
3642 );
43+
44+ // Re-inject old logger
45+ $ this ->getClient ()->setLogger ($ oldLogger );
46+
3747 $ this ->assertInstanceOf (
3848 'OpenCloud\LoadBalancer\Service ' ,
3949 $ this ->getClient ()->loadBalancerService ('cloudLoadBalancers ' , 'DFW ' )
You can’t perform that action at this time.
0 commit comments