@@ -23,4 +23,27 @@ public function client_config_data_can_be_accessed()
2323 $ this ->assertEquals ('clientSecret ' , $ sfClientConfig ->getClientSecret ());
2424 $ this ->assertEquals ('v37.0 ' , $ sfClientConfig ->getVersion ());
2525 }
26+
27+ /** @test */
28+ public function client_config_knows_if_all_values_have_been_set ()
29+ {
30+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('' , 'clientId ' , 'clientSecret ' , 'v37.0 ' );
31+
32+ $ this ->assertFalse ($ sfClientConfig ->isFullyConfigured ());
33+
34+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('hello ' , '' , 'clientSecret ' , 'v37.0 ' );
35+ $ this ->assertFalse ($ sfClientConfig ->isFullyConfigured ());
36+
37+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('hello ' , 'testing ' , '' , 'v37.0 ' );
38+ $ this ->assertFalse ($ sfClientConfig ->isFullyConfigured ());
39+
40+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('hello ' , 'clientId ' , 'clientSecret ' , '' );
41+ $ this ->assertFalse ($ sfClientConfig ->isFullyConfigured ());
42+
43+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('hello ' , 'clientId ' , 'clientSecret ' , 'v37.0 ' );
44+ $ this ->assertTrue ($ sfClientConfig ->isFullyConfigured ());
45+
46+ $ sfClientConfig = new \Napp \Salesforce \ClientConfig ('' , '' , '' , '' );
47+ $ this ->assertFalse ($ sfClientConfig ->isFullyConfigured ());
48+ }
2649}
0 commit comments